-
Notifications
You must be signed in to change notification settings - Fork 185
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
fix(ChipsSelect/CustomSelect): Change key back to option.value #7276
Conversation
size-limit report 📦
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
e2e tests |
👀 Docs deployed
Commit 914ed52 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7276 +/- ##
==========================================
- Coverage 84.08% 84.08% -0.01%
==========================================
Files 363 362 -1
Lines 10985 11026 +41
Branches 3629 3634 +5
==========================================
+ Hits 9237 9271 +34
- Misses 1748 1755 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…#7276) В момент когда делали ChipsSelect стабильным (#6206), мы поменяли key на использование option.label вместо option.value. Это не совсем правильно, так как текстовое представление label может совпадать, в то время как value должно быть уникальным. Поменял key в ChipsInput при рендере Chips и в ChipsSelect при рендере options. Обновил key в CustomSelect для единообразия по аналогии с ChipsSelect.
✅ v6.4.1 🎉 |
Описание
В момент когда делали ChipsSelect стабильным (#6206), мы поменяли key на использование
option.label
вместоoption.value
. Это не совсем правильно, так как текстовое представлениеlabel
может совпадать, в то время какvalue
должно быть уникальным.Пример с воспроизведением: https://codesandbox.io/p/sandbox/muddy-water-4jxc78?file=/src/App.tsx:13,1
Изменения
Поменял key в
ChipsInput
при рендереChips
и вChipsSelect
при рендере options.Обновил key в
CustomSelect
для единообразия по аналогии с ChipsSelect.