Reproduction link
Steps to reproduce
Render a select in tags mode with a custom tagRender property which throws if value is undefined.
What is expected?
I expected tagRender only to be invoked if value is defined (i. e. a valid string)
What is actually happening?
tagRender prop is being invoked even if there is no value present (with value being set to undefined)
| Environment | Info |
| ------------ | ------------ |
| antd | 5.15.2 |
| React | 18.2.0 |
| System | linux |
| Browser | chrome |
The issue was introduced with antd 5.15.2 which in turn was caused by the update of rc-select to version 14.12.1 to 14.13.0 which in turn just bumped up the version of rc-trigger from 1.5.0 to 2.0.0.
3条答案
按热度按时间2cmtqfgy1#
Start a new pull request in StackBlitz Codeflow .
twh00eeo2#
Having the same issue
vtwuwzda3#
It's this part btw, that causes the issue: https://github.com/react-component/select/blob/ebc3f689eac9640534026fb3349e901dd55bdab6/src/Selector/MultipleSelector.tsx#L179