Skip to content

Conversation

6uzm4n
Copy link

@6uzm4n 6uzm4n commented Sep 11, 2025

This PR builds on #4080 and #3705, updating it to support the most recent version of React Select.

The autoFocusOption prop has been tweaked to only disable the default selected option when no user input has been provided, which covers the main two cases where this prop is useful but retains the ability to fill the select using only the keyboard:

  • When the menu is first open.
  • When a value is selected in an isMulti select with closeMenuOnSelect set as false, as by default the inputValue is cleared.

The latter of the two has been the source of many long-standing issues (#2848, #3324, #3484, #5447), mainly because it made two common patterns difficult at best and impossible at worst:

  • Cleanly listening to the enter key to trigger a form submission.
  • If used in conjunction with tabSelectsValue while having multiple selects with tabIndex. it was impossible to tab to the next select without selecting an unprompted option.

Seeing the proposals of previous issues and PRs I've tried to keep the name of the prop as concise and clear as possible, but if anyone has any better name based on its behavior I'm open to suggestions.

This PR doesn't provide any new example in the docs, as the prop itself is quite simple to understand and I don't think there is any place in the docs where it makes sense to have it. However, if any maintainer thinks that an example would be nice to have, I will be happy to include it.

Copy link

changeset-bot bot commented Sep 11, 2025

⚠️ No Changeset found

Latest commit: a38c87e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codesandbox-ci bot commented Sep 11, 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.

@6uzm4n
Copy link
Author

6uzm4n commented Sep 29, 2025

@Methuselah96 this is a highly requested feature that would be nice to have for a lot of people 🙏🏻

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.

1 participant