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

ColorPicker component has typescript errors for the methods in the event props #3020

Open
bolivierjr opened this issue Mar 10, 2022 · 1 comment

Comments

@bolivierjr
Copy link
Contributor

Our team uses SLDS react components in a typescript environment and we are seeing a few typescript errors on certain props in the ColorPicker component that uses event handlers. Issues are happening in the event props for the following event handlers: onChange, onClose, onOpen, onRequestClose, onWorkingColorChange. This is due to the types for those props only take in one parameter, e.g. onChange?: (v: any) => any; instead of having an additional event parameter for the handler. We recently fixed some other components in a seperate Issue/PR that was merged, here. This makes our linting tools fail in our CI/CD. Here are some snapshots of the error.

Screen Shot 2022-03-10 at 10 51 15 AM
Screen Shot 2022-03-10 at 10 51 58 AM

@bolivierjr
Copy link
Contributor Author

looks like there is already an issue and PR open for this #3008, with more explicit types, that might be the better choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant