.link fixes + Add Modal defaultData

This commit is contained in:
venashial
2022-06-19 21:27:20 -07:00
parent 49acfc496b
commit b3233cab71
4 changed files with 11 additions and 6 deletions

View File

@@ -14,11 +14,12 @@
/** If enabled, clicking outside the modal with close it */
export let dismissable = true
export let data: Record<string, any> = {}
export let defaultData: Record<string, any> = {}
export let data: Record<string, any> = defaultData
function close() {
open = false
data = {}
data = defaultData
}
function trigger() {

View File

@@ -41,8 +41,8 @@
disabled={key !== data.key}
let:close
on:click={() => {
dispatch('deletion')
close()
dispatch('deletion')
}}>
<IconTrash />
{$t(`modal.deletion.${type}.action`)}