-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Add Press event prop types and fix a check in Safari #15288
Add Press event prop types and fix a check in Safari #15288
Conversation
Details of bundled changes.Comparing: 5ef0d1d...77f2284 react-events
Generated by 🚫 dangerJS |
event.keyCode is a deprecated API
packages/react-events/src/Press.js
Outdated
type PressProps = { | ||
disabled: boolean, | ||
delayLongPress: number, | ||
delayPress: number, |
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.
Remove this prop for now. There's no equivalent that we're currently using (only delay for start/end). And if onPress
is not cancelled it is always a "completion" event that occurs immediately after onPressEnd
.
packages/react-events/src/Press.js
Outdated
delayPress: number, | ||
delayPressEnd: number, | ||
delayPressStart: number, | ||
hitSlop: Object, |
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.
Remove this prop for now #15261
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.
Nice clean up + additional types!
Ref #15257