Skip to content

add clearSearchOnFocus to Select#627

Merged
AnnMarieW merged 3 commits intosnehilvj:masterfrom
AnnMarieW:add-clearSearchOnFocus-to-Select
Aug 13, 2025
Merged

add clearSearchOnFocus to Select#627
AnnMarieW merged 3 commits intosnehilvj:masterfrom
AnnMarieW:add-clearSearchOnFocus-to-Select

Conversation

@AnnMarieW
Copy link
Copy Markdown
Collaborator

closes #626

adds clearSearchOnFocus so a searchable Select is similar to the dcc.Dropdown

@AnnMarieW AnnMarieW requested a review from alexcjohnson August 13, 2025 18:42
/** Props passed down to the underlying `ScrollArea` component in the dropdown */
scrollAreaProps?: ScrollAreaProps;
/** If set, the highlighted option is selected when the input loses focus @default `false` */
autoSelectOnBlur?: boolean;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this one important enough to include a test for? That said when I try it on their docs site it doesn't seem to do what it says 🤷

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I included a test because it is not a Mantine prop. They don't have this feature available in their basic Select component.
I'll post a sample app in this test environment so you can give it a try.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oh. I just answered a different question. I thought you were asking about the clearSearchOnFocus which is the new feature added in this PR.

Their autoSelectOnBlur is not currently working as they describe in their docs. (It's a bug.) I reported it and they said it will be fixed in 8.2.5. I'll wait for that before releasing

Copy link
Copy Markdown
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃

@AnnMarieW AnnMarieW merged commit 1512e3d into snehilvj:master Aug 13, 2025
1 check passed
@AnnMarieW AnnMarieW deleted the add-clearSearchOnFocus-to-Select branch August 13, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] allow dmc.Select search to clear search text when dropdown is selected, similar to dcc.Dropdown

2 participants