select
select copied to clipboard
select选择后报错`label` of `value` is not same as `label` in Select options.
option里不是string而是dom结构的情景下,如果在onchange事件里去更新state,就会报这个错误,感觉原因是在抛出警告的判断上,optionlabel和rowlabel如果是reactnode的情况下,他们两个虽然结构一样但是不相等
I am facing this issue as well. It occurs when using React elements, i.e. not strings, as labels.
https://github.com/react-component/select/blob/fe1a13a6ccb9551e17fe7c8ea282bf5df907041d/src/Select.tsx#L275
in here , if options render label using React elements will trigger this problem. maybe just ignore react element compare equal.
ref: https://github.com/ant-design/ant-design/issues/40205