3
0

Fix bulk record edit modal fields and values not resetting on save

This commit is contained in:
Jože Fortun
2023-04-07 13:58:24 +02:00
parent a1a38ba28e
commit 11aef97d1c
5 changed files with 14 additions and 20 deletions

View File

@@ -1679,7 +1679,8 @@ export default {
onInlineEdit () {
this.refresh(true)
this.inlineEditRecords = []
this.inlineEdit.fields = []
this.inlineEdit.recordIDs = []
},
isFieldEditable (field) {

View File

@@ -211,6 +211,7 @@ export default {
if (this.openOnSelect) {
this.fields = []
this.record = new compose.Record(this.module, {})
}
},

View File

@@ -294,21 +294,13 @@ export default {
throw err
})
.then(({ records }) => {
return records[0]
})
.then((record) => {
this.updatePrompts()
return record
})
.then((record) => {
if (record.valueErrors && record.valueErrors.set) {
this.toastWarning(this.$t('notification:record.validationWarnings'))
} else {
this.toastSuccess(this.$t('notification:record.bulkRecordUpdateSuccess'))
this.onModalHide()
this.$emit('save')
}
.then(this.updatePrompts())
.then(() => {
this.toastSuccess(this.$t('notification:record.bulkRecordUpdateSuccess'))
this.onModalHide()
this.fields = []
this.record = new compose.Record(this.module, {})
this.$emit('save')
})
.catch(this.toastErrorHandler(this.$t('notification:record.deleteBulkRecordUpdateFailed')))
.finally(() => {

View File

@@ -20,7 +20,7 @@
>
{{ $t('label.pageBuilder') }}
<font-awesome-icon
:icon="['far', 'edit']"
:icon="['fas', 'cog']"
class="ml-2"
/>
</b-button>
@@ -175,7 +175,7 @@
@click="openIconModal"
>
<font-awesome-icon
:icon="['fas', 'cog']"
:icon="['far', 'edit']"
/>
</b-button>
</template>
@@ -322,7 +322,7 @@
:to="{ name: 'admin.pages.builder', query: { layoutID: layout.pageLayoutID} }"
>
<font-awesome-icon
:icon="['far', 'edit']"
:icon="['fas', 'cog']"
/>
</b-button>
</b-input-group-append>

View File

@@ -21,7 +21,7 @@
>
{{ $t('general:label.pageBuilder') }}
<font-awesome-icon
:icon="['far', 'edit']"
:icon="['fas', 'cog']"
class="ml-2"
/>
</b-button>