-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Select label render 支持自定义用户自己处理迭代 #48579
Comments
|
抱歉,我意思是labelRender的api设计应该和maxTagPlaceholder类似才对吧(多选模式下),label应该指整体,而不是单个tag,现在提供的labelRender 相当于map的迭代器 其实我感觉应该是这样的 我考虑先使用maxTagCount=0 然后使用maxTagPlaceholder来实现吧 |
What does the proposed API look like? 完整的 API 描述一下。 |
后来我想到maxTagCount + maxTagPlaceholder 也能实现,就先这样吧 |
但其实还有一些别的问题是 labelRender -> 然后tagRender应该把action remove 做参数也返回,不然需要自己去做受控,实际使用有点麻烦 tagRender -> |
tagRender 是有返回 onClose 属性的,可以直接用 |
大哥,onXXX 都是事件回调 |
|
看起来都是可以通过代码实现的功能,没其他问题先关闭了 |
What problem does this feature solve?
我理解在多选模式下tagRender是可迭代的,但是labelRender应该是返回当前选择的数据用户手动去处理迭代的,但是现在两者都是处理迭代的情况,没办法做到自己处理迭代的情况,
What does the proposed API look like?
(props: Option[]) => ReactNode。因为有些场景可能要在外层包裹一个自定义的容器
The text was updated successfully, but these errors were encountered: