Просмотр исходного кода

Merge pull request #220 from smiclea/fix-alert

Fix `Enter` key ignore in some confirmation modals
Dorin Paslaru 8 лет назад
Родитель
Сommit
c7f0e0ce44
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/components/organisms/AlertModal/index.jsx

+ 1 - 1
src/components/organisms/AlertModal/index.jsx

@@ -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()