Skip to content

Commit

Permalink
Merge pull request #220 from smiclea/fix-alert
Browse files Browse the repository at this point in the history
Fix `Enter` key ignore in some confirmation modals
  • Loading branch information
Dorin Paslaru authored May 2, 2018
2 parents 1dbcc87 + 8bf53d0 commit c7f0e0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/organisms/AlertModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class AlertModal extends React.Component<Props> {
id: string

componentDidMount() {
this.id = new Date().getTime().toString()
this.id = `${new Date().getTime().toString()}-${Math.random()}`
KeyboardManager.onEnter(`alert-${this.id}`, () => {
if (this.props.isOpen) {
this.props.onConfirmation()
Expand Down

0 comments on commit c7f0e0c

Please sign in to comment.