-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[DropDownMenu] not trigger event on the page when clicking away #1177
Conversation
@hai-cea Fix. This is much better! This also prevent expensive and useless render on touch event when the dropdownmenu is closed. (I can see the difference on cordova) |
menuItemStyle={this.mergeAndPrefix(styles.menuItem, this.props.menuItemStyle)} | ||
hideable={true} | ||
visible={this.state.open} | ||
onRequestClose={this._onMenuRequestClose} | ||
onItemTap={this._onMenuItemClick} /> | ||
{this.state.open && <div style={styles.overlay} onTouchTap={this._onTouchTapOverlay} />} |
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.
@oliviertassinari Very nice solution! Just have a small naming change on this line. For event handling I usually use: _handleOverlayTouchTap
.
Sorry for the extra commit, done from my phone.
@hai-cea okey |
[DropDownMenu] not trigger event on the page when clicking away
Thanks @oliviertassinari 👍 |
* Fix persian examples * Remove injected css after front-end mount * Determine and apply styles for current orientation * Add tests * Support landscape for TimePicker * Use isomorphic effect for event handler * Fix lint errors * Add new props to the documentation * Fix displaying short weekdays in datepicker toolbar
Fix #1174.