Allow to add custom node before or after select items #10831
Comments
让产品改需求吧,比如把新增按钮放下拉框后边 |
@rainke |
你可以组合一个,我们 antd 是组件。这个已经是业务或者产品了 |
感觉可以提供类似 |
新增再谈一个表单? 我感觉这个我们做不合适 |
用户做什么不管,提供的是前后插入自定义 node 的能力。 |
@afc163 good! |
这是遇到的类似场景: |
这个是级联框吧 |
像类似这种Select衍生交互,还是希望Select有插入自定义node的能力。 |
@afc163 Any decision on the topic as you closed both issues? I think it's very useful and commonly supported by many other select libraries. https://react-select.com/creatable does it perfectly. |
It is not closed. I am indented to solution of #10831 (comment) Welcome to help us and send us PR~ |
Hi @afc163! Are there any possible workarounds to add button before options? Sorry for messy questions but I need this feature ASAP. Thank you! |
下拉新增感觉可以这么做? https://codesandbox.io/s/v87kr0mlyy |
@zombieJ thank you and I can even add custom styling because |
@zombieJ eventually your sandbox example helps me made the magic. Thank you! Code example to all who reach this issue:
and within |
https://codesandbox.io/s/antdselectaddoption-7fov7 Still not perfect. |
I just forked your code-sandbox and refactored it for my use-case. It's worked enough to meet my needs :) |
@demirhancosku used your fork updated(used hooks) it to work like react-select creatable Codesandbox |
What problem does this feature solve?
有这样一个场景:单位Select,在选项下可以放组件,如:按钮——“新增”。

如图:
What does the proposed API look like?
Select,在选项下区域,可以允许自定义组件,有考虑支持这样吗?
The text was updated successfully, but these errors were encountered: