Skip to content

fix(SelectNext): reset search-input on dropdown close (DS-5217)#414

Merged
KamilEmeleev merged 1 commit into
mainfrom
fix/ds-5217
Jul 6, 2026
Merged

fix(SelectNext): reset search-input on dropdown close (DS-5217)#414
KamilEmeleev merged 1 commit into
mainfrom
fix/ds-5217

Conversation

@KamilEmeleev

Copy link
Copy Markdown
Collaborator

No description provided.

@KamilEmeleev KamilEmeleev added the bug Something isn't working label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 37b1000):

https://react-koobiq-next--prs-414-0l3ncmz5.web.app

(expires Sat, 11 Jul 2026 10:11:55 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: fc29847d4a9e5cb1adf458c76a9b681c76e2eeff

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes SelectNext search behavior by clearing the internal search query when the dropdown closes (while preserving controlled inputValue behavior), aligning the component’s UX with DS-5217.

Changes:

  • Add internal controlled state for the search query and reset it on open→close transitions for uncontrolled usage.
  • Wire SelectList search input changes through the new internal state setter to ensure onInputChange is called consistently.
  • Add/extend Vitest coverage to validate reset behavior, default input handling, and controlled input preservation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/components/src/components/SelectNext/Select.tsx Introduces controlled search input state + effect to reset query when the dropdown closes (uncontrolled only).
packages/components/src/components/SelectNext/tests/Select.test.tsx Adds regression tests covering query reset on close, defaultInputValue behavior, and controlled inputValue not being reset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KamilEmeleev KamilEmeleev merged commit 72f124f into main Jul 6, 2026
8 checks passed
@KamilEmeleev KamilEmeleev deleted the fix/ds-5217 branch July 6, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants