Add confirmOnEnter prop to confirm dialog

For some dialogs, the confirm event should fire on enter. This change
adds this optional property.

Checking the disabled property before firing the confirm event should
prevent unintended side effects throughout the app.

Change-Id: I5603065b37bf87b1c4b36ff54376fb4066869afe
This commit is contained in:
Kasper Nilsson
2018-02-12 16:24:31 -08:00
parent 076543f040
commit 7d50910d77
8 changed files with 45 additions and 3 deletions

View File

@@ -68,6 +68,7 @@ limitations under the License.
class="confirmDialog"
disabled="[[!_hasNewGroupName]]"
confirm-label="Create"
confirm-on-enter
on-confirm="_handleCreateGroup"
on-cancel="_handleCloseCreate">
<div class="header" slot="header">