Skip to content
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

Fix deprecation suggestion of select event handler types #2680

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timothyis
Copy link

What's Changed

When I was updating from v8 -> v9 I came across the deprecation notice for the SelectSingleEventHandler, which gave me the deprecation notice before this PR. When using the suggestion, I was met with:

ts: Type '"single"' has no properties in common with type '{ mode?: Mode | undefined; required?: boolean | undefined; }'.

Implementing the change I've made on this PR made the warning disappear, though you can also do SelectHandler<{ required: true }> and I'm not sure if that's correct. So maybe a type change needs to be made also.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

@rodgobbi
Copy link
Collaborator

rodgobbi commented Feb 6, 2025

Hi @timothyis

Thanks for the PR!

It's indeed a mistake of the docs, as the generic type for the SelectHandler type needs to extend { mode?: Mode | undefined; required?: boolean | undefined }.

Could you fix the linter in your changes?
So the CI passes and we can merge the changes.

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.

2 participants