-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(datepicker): Rename props and update onChange signature #84
Conversation
this is pending on deseretdigital/dayzed#34 to be completed
…ents from React Semantic UI we are now passing the event or undefined as the first argument and a data object with the props and the new value as the second argument BREAKING CHANGE: onDateChange signature was changed
this change is to match the API with others components from React Semantic UI BREAKING CHANGE: onDateChange prop was renamed to onChange
this change is to match the API with others components from React Semantic UI BREAKING CHANGE: selected prop was renamed to value
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/arthurdenner/react-semantic-ui-datepickers/lvjxtqwkda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the event not passed as the first parameter in basic
and range
?
No reason. I just happened to add it as the second argument. Do you think it's better to have it as the first for consistency or any other reason? |
Yes, once React Semantic UI uses this pattern. |
BREAKING CHANGE: onDateChange signature was changed BREAKING CHANGE: onDateChange prop was renamed to onChange BREAKING CHANGE: selected prop was renamed to value
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What kind of change does this PR introduce?
Feature. Closes #30.
What is the current behavior?
Our component has a different API from the other components from React Semantic UI.
The main differences are:
onChange
;value
;onChange
props on RSUI is: (event: SyntheticEvent, data: ComponentProps).What is the new behavior?
All the points mentioned above are addressed.
Checklist: