Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧐[问题] actionsRender 自定义时,使用默认的dom重新生成错误 #347

Closed
mingxin-yang opened this issue Jan 18, 2025 · 1 comment

Comments

@mingxin-yang
Copy link

🧐 问题描述

自定义了actionsRender, role 为 tip-message 不需要显示actions,其他的还是使用默认的,但是这样写了之后,在answer的后面点击重新生成时,answer变成了question重新请求了。

💻 示例代码

actionsRender:  (item: any, dom: any) => {
            console.log("actionsRender: ", item)
            if (item?.originData?.role === "tip-message") {
              return <div></div>
            }
            let updateDom = React.cloneElement(dom, {
              actions:item.actions
            })
            return updateDom
          },

🚑 其他信息

@mingxin-yang
Copy link
Author

是我的问题,没有设置parentId

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant