Skip to content
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

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

mendrew
Copy link
Contributor

@mendrew mendrew commented Jul 31, 2024

Описание

В момент когда делали 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.

@mendrew mendrew self-assigned this Jul 31, 2024
@github-actions github-actions bot added the patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Jul 31, 2024
Copy link
Contributor

github-actions bot commented Jul 31, 2024

size-limit report 📦

Path Size
JS 377.8 KB (+0.01% 🔺)
JS (gzip) 115.52 KB (-0.01% 🔽)
JS (brotli) 95.16 KB (+0.04% 🔺)
JS import Div (tree shaking) 1.39 KB (0%)
CSS 303.65 KB (0%)
CSS (gzip) 38.8 KB (0%)
CSS (brotli) 31.23 KB (0%)

Copy link

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.

Copy link
Contributor

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Jul 31, 2024

👀 Docs deployed

Commit 914ed52

@mendrew mendrew added this to the v6.5.0 milestone Jul 31, 2024
@mendrew mendrew marked this pull request as ready for review July 31, 2024 07:49
@mendrew mendrew requested a review from a team as a code owner July 31, 2024 07:49
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.08%. Comparing base (905bbbe) to head (914ed52).
Report is 5 commits behind head on master.

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     
Flag Coverage Δ
unittests 84.08% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mendrew mendrew merged commit 9d9f409 into master Aug 1, 2024
49 checks passed
@mendrew mendrew deleted the mendrew/fix/ChipsSelect/key branch August 1, 2024 08:41
vkcom-publisher pushed a commit that referenced this pull request Aug 1, 2024
…#7276)

В момент когда делали ChipsSelect стабильным (#6206), мы поменяли key на использование option.label вместо option.value. Это не совсем правильно, так как текстовое представление label может совпадать, в то время как value должно быть уникальным.

Поменял key в ChipsInput при рендере Chips и в ChipsSelect при рендере options.
Обновил key в CustomSelect для единообразия по аналогии с ChipsSelect.
@mendrew mendrew modified the milestones: v6.5.0, v6.4.1 Aug 1, 2024
@vkcom-publisher
Copy link
Contributor

v6.4.1 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp:chips-input cmp:chips-select patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча type:bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants