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

Incorrect generic type definition is SelectChangeEvent #44783

Open
ilayofirdooble opened this issue Dec 16, 2024 · 1 comment
Open

Incorrect generic type definition is SelectChangeEvent #44783

ilayofirdooble opened this issue Dec 16, 2024 · 1 comment
Assignees
Labels
component: select This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information typescript

Comments

@ilayofirdooble
Copy link

ilayofirdooble commented Dec 16, 2024

When using the SelectChangeEvent with a specific value type:
const event: SelectChangeEvent<'option 1' | 'option 2'>

The event.target.value is still of type 'string' instead of the expected 'option 1' | 'option 2' type

| React.ChangeEvent<HTMLInputElement>;

Search keywords:

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 16, 2024
@zannager zannager added the component: select This is the name of the generic UI component, not the React module! label Dec 16, 2024
@mnajdova
Copy link
Member

It doesn't look like this bug report has enough info for one of us to reproduce it.

Please provide a CodeSandbox (https://material-ui.com/r/issue-template-latest), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.

Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

@mnajdova mnajdova added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information typescript
Projects
None yet
Development

No branches or pull requests

4 participants