fix(modal): shouldSubmitOnEnter should also dispatch "click:button--primary" (#1007)

* fix(modal): shouldSubmitOnEnter should also dispatch "click:button--primary"

Fixes #1005

* yarn build:lib
This commit is contained in:
Eric Liu 2022-01-14 08:51:48 -10:00 committed by GitHub
commit 49a94b0ee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 25 deletions

View file

@ -78,7 +78,8 @@ export interface ModalProps
primaryButtonDisabled?: boolean;
/**
* Set to `true` for the primary button to be triggered when pressing "Enter"
* Set to `true` for the "submit" and "click:button--primary" events
* to be dispatched when pressing "Enter"
* @default true
*/
shouldSubmitOnEnter?: boolean;