10000 fix(CustomSelect): fix option props drilling by EldarMuhamethanov · Pull Request #8426 · VKCOM/VKUI · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(CustomSelect): fix option props drilling #8426

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

Merged

Conversation

EldarMuhamethanov
Copy link
Contributor
  • Release notes

Описание

Предположим мы хотим , чтобы у некоторых опций в CustomSelect был отрисован дополнительный элемент after

options: [
      {
        label: 'Санкт-Петербург',
        description: 'Россия',
        value: '0',
        after: <ContentBadge>Badge</ContentBadge>,
      },
      {
        label: 'Москва',
        description: 'Россия',
        value: '1',
      },
    ],

Сейчас по умолчанию в renderOption используется CustomSelectOption, который может принимать after и ожидается, что все должно сработать. Но after не отрисовывается, потому что не прокидывается до функции отрисовки renderOption, хотя по логике должно. Помимо after есть и другие свойства, которые не доходят до функции отрисовки и по сути они вообще никогда ничего не делают

Изменения

Добавил прокидывание свойств option из массива options при вызове renderOption

Release notes

Исправления

  • CustomSelect: Поправлено прокидывание свойств option до функции отрисовки

@EldarMuhamethanov EldarMuhamethanov self-assigned this Apr 3, 2025
@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner April 3, 2025 07:32
@github-actions github-actions bot added the ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Apr 3, 2025
Copy link
codesandbox-ci bot commented Apr 3, 2025

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
github-actions bot commented Apr 3, 2025

size-limit report 📦

Path Size
JS 403.23 KB (+0.01% 🔺)
JS (gzip) 119.86 KB (+0.01% 🔺)
JS (brotli) 98.39 KB (-0.09% 🔽)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 348.95 KB (0%)
CSS (gzip) 43.23 KB (0%)
CSS (brotli) 34.47 KB (0%)

Copy link
Contributor
github-actions bot commented Apr 3, 2025

e2e tests

⚠️ Some screenshots were failed. See Playwright Report.

Playwright Report

Copy link
Contributor
github-actions bot commented Apr 3, 2025

👀 Docs deployed

Commit 103856a

@EldarMuhamethanov EldarMuhamethanov moved this to 👀 In Review in VKUI Apr 3, 2025
@EldarMuhamethanov EldarMuhamethanov merged commit 8b53b43 into master Apr 4, 2025
27 checks passed
@EldarMuhamethanov EldarMuhamethanov deleted the e.muhamethanov/custom-select-fix-option-props branch April 4, 2025 09:18
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in VKUI Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча cmp:custom-select type:bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants
0