Fix bulk record edit modal fields and values not resetting on save
This commit is contained in:
@@ -1679,7 +1679,8 @@ export default {
|
||||
|
||||
onInlineEdit () {
|
||||
this.refresh(true)
|
||||
this.inlineEditRecords = []
|
||||
this.inlineEdit.fields = []
|
||||
this.inlineEdit.recordIDs = []
|
||||
},
|
||||
|
||||
isFieldEditable (field) {
|
||||
|
||||
@@ -211,6 +211,7 @@ export default {
|
||||
|
||||
if (this.openOnSelect) {
|
||||
this.fields = []
|
||||
this.record = new compose.Record(this.module, {})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
>
|
||||
{{ $t('general:label.pageBuilder') }}
|
||||
<font-awesome-icon
|
||||
:icon="['far', 'edit']"
|
||||
:icon="['fas', 'cog']"
|
||||
class="ml-2"
|
||||
/>
|
||||
</b-button>
|
||||
|
||||
Reference in New Issue
Block a user