fix(MultiComboBox): itemの比較にitem.labelを参照していたのをやめる #5191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
関連URL
https://kufuinc.slack.com/archives/C06KVP5PL23/p1734060131150619
概要
close #5190
MultiComboBoxのitem同士が同一かどうかの判定でlabelも参照されているが、labelに設定できるJSX.Elementは等価であっても等値ではない場合がありうるので、label同士の === による判定が意図通りになるかはアプリケーションの実装による。
この判定が意図通りにならない場合、同じアイテムを複数回選択できてしまう・一度選択したアイテムを選択解除できないなどの問題が発生しそう
変更内容
valueがitems内で一意(valueが同じでlabelが違うitemは無い)という前提を置き、MultiComboBox内でitem同士が同一かどうかの判定を行っていた部分でlabelも参照するのをやめました。
確認方法