mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 13:47:26 +03:00
fix Dialog (form) submit behaviour on Enter
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
f91cead9f1
commit
c232bc1d59
@ -32,7 +32,7 @@
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<form class="dialog">
|
||||
<form class="dialog" on:submit|preventDefault={() => { okAction(); dispatch('close') }}>
|
||||
<div class="header">
|
||||
<div class="title"><Label {label}/></div>
|
||||
<div class="tool" on:click={() => { dispatch('close') }}><Close size={'small'}/></div>
|
||||
@ -41,8 +41,8 @@
|
||||
<ScrollBox vertical gap={0}><slot/></ScrollBox>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<Button label={okLabel} primary on:click={() => { okAction(); dispatch('close') }}/>
|
||||
<Button label={'Cancel'} on:click={() => { okAction(); dispatch('close') }}/>
|
||||
<Button label={okLabel} primary/>
|
||||
<Button label={'Cancel'} on:click={() => { dispatch('close') }}/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user