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

feat(table): EditableProTable支持自定义渲染新建按钮 #8831

Conversation

louhaojie99
Copy link

Copy link

⚡️ Deploying PR Preview...

/** 设置按钮文案 */
creatorButtonText?: React.ReactNode;
/** 自定义渲染 */
render?: (originNode: JSX.Element) => JSX.Element;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 render 的属性参数的 TS 定义,综合考虑使用 JSX,Element 比较符合这里的情况;通常看到一些自定义 render 的 API 都是支持返回 React.Node 类型,这个类型太宽泛也不太实际情况 (因为最终期望是一个新建按钮 JSX)。

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

Successfully merging this pull request may close these issues.

1 participant