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="editFolder" />
|
||||
<ButtonPrimary
|
||||
:label="$t('action.save')"
|
||||
:loading="loadingState"
|
||||
@click.native="editFolder"
|
||||
/>
|
||||
<ButtonSecondary
|
||||
:label="$t('action.cancel')"
|
||||
@click.native="hideModal"
|
||||
@@ -41,6 +45,7 @@ export default defineComponent({
|
||||
props: {
|
||||
show: Boolean,
|
||||
editingFolderName: { type: String, default: null },
|
||||
loadingState: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -59,7 +64,6 @@ export default defineComponent({
|
||||
return
|
||||
}
|
||||
this.$emit("submit", this.name)
|
||||
this.hideModal()
|
||||
},
|
||||
hideModal() {
|
||||
this.name = null
|
||||
|
||||
Reference in New Issue
Block a user