feat: loading states for modal buttons (#2268)
This commit is contained in:
@@ -24,7 +24,11 @@
|
||||
</template>
|
||||
<template #footer>
|
||||
<span>
|
||||
<ButtonPrimary :label="$t('action.save')" @click.native="addFolder" />
|
||||
<ButtonPrimary
|
||||
:label="$t('action.save')"
|
||||
:loading="loadingState"
|
||||
@click.native="addFolder"
|
||||
/>
|
||||
<ButtonSecondary
|
||||
:label="$t('action.cancel')"
|
||||
@click.native="hideModal"
|
||||
@@ -43,6 +47,7 @@ export default defineComponent({
|
||||
folder: { type: Object, default: () => {} },
|
||||
folderPath: { type: String, default: null },
|
||||
collectionIndex: { type: Number, default: null },
|
||||
loadingState: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -60,7 +65,6 @@ export default defineComponent({
|
||||
folder: this.folder,
|
||||
path: this.folderPath || `${this.collectionIndex}`,
|
||||
})
|
||||
this.hideModal()
|
||||
},
|
||||
hideModal() {
|
||||
this.name = null
|
||||
|
||||
Reference in New Issue
Block a user