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

<AsyncSelectInput> expose generics of the underlying AsyncSelect from react-select/async component #2963

Open
ragafus opened this issue Oct 14, 2024 · 1 comment · May be fixed by #2946
Open
Labels
🐛 Type: Bug Something isn't working

Comments

@ragafus
Copy link
Contributor

ragafus commented Oct 14, 2024

The component AsyncSelectInput is hardcoding the generics that AsyncSelect from react-select/async component exposes (see current ReactSelectAsyncProps type). Due to this fact, the consumers of AsyncSelectInput using TypeScript need to cast some of the props of the component. See this example in DIscounts app.

To solve the issue, AsyncSelectInput, SearchSelectInput, and SearchSelectField should properly use the generics react-select/async provides.

@ragafus
Copy link
Contributor Author

ragafus commented Oct 14, 2024

I've created the following PR as an initial step to solve the issue. Feel free to close it if is not helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Type: Bug Something isn't working
Projects
None yet
1 participant