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

TagInput should have a string-only variant with simpler prop types #4390

Open
adidahiya opened this issue Oct 27, 2020 · 0 comments
Open

TagInput should have a string-only variant with simpler prop types #4390

adidahiya opened this issue Oct 27, 2020 · 0 comments

Comments

@adidahiya
Copy link
Contributor

Working with onRemove: (value: React.ReactNode, index: number) is inconvenient under TypeScript's strict compiler options. Even when the values prop is string[], you are either forced to type cast the removed value to string or use the index parameter to index into your values array. We should make the simple case easier to work with, either with a new component API or changing the existing component to be parameterized by its data type <T>.

adidahiya added a commit that referenced this issue Oct 27, 2020
This is not applicable under TypeScript's strict compilation modes, so we should not recommend the implicit type coercion. #4390 tracks improving the API usability for string-only TagInputs.
@adidahiya adidahiya added this to the 4.x milestone Oct 27, 2020
@adidahiya adidahiya modified the milestones: 4.x, 4.0.0-beta.0 Mar 4, 2021
@adidahiya adidahiya modified the milestones: 4.0.0-beta.0, 4.0.0 Apr 15, 2021
@adidahiya adidahiya removed this from the 5.0.0 milestone Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant