Skip to content

Commit c7f0e0c

Browse files
author
Dorin Paslaru
authored
Merge pull request #220 from smiclea/fix-alert
Fix `Enter` key ignore in some confirmation modals
2 parents 1dbcc87 + 8bf53d0 commit c7f0e0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/organisms/AlertModal/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AlertModal extends React.Component<Props> {
7474
id: string
7575

7676
componentDidMount() {
77-
this.id = new Date().getTime().toString()
77+
this.id = `${new Date().getTime().toString()}-${Math.random()}`
7878
KeyboardManager.onEnter(`alert-${this.id}`, () => {
7979
if (this.props.isOpen) {
8080
this.props.onConfirmation()

0 commit comments

Comments
 (0)