Skip to content

fix: don't reset search on click within input in multiselect#1371

Merged
huwshimi merged 2 commits into
canonical:mainfrom
Ninfa-Jeon:multi-select-input
May 6, 2026
Merged

fix: don't reset search on click within input in multiselect#1371
huwshimi merged 2 commits into
canonical:mainfrom
Ninfa-Jeon:multi-select-input

Conversation

@Ninfa-Jeon
Copy link
Copy Markdown
Contributor

Done

  • Fixed the issue where if you type in the search box and then click somewhere inside the input to try and edit the text the input gets cleared (PFA)

QA

Pinging @canonical/react-library-maintainers for a review.

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

  • Go to the MultiSelect search variant story
  • Type something in the search input
  • Now, try to click within this input as if to edit the text you just entered
  • The search text should not be reset

Details

Before:

multiselect.mov

Copy link
Copy Markdown
Contributor

@huwshimi huwshimi left a comment

Choose a reason for hiding this comment

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

I've simplified this and added a test.

@huwshimi huwshimi merged commit dda5257 into canonical:main May 6, 2026
8 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🎉 This PR is included in version 4.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants