Add preselect fields when exporting a record list

This commit is contained in:
Kelani Tolulope
2023-03-22 17:30:26 +01:00
parent 6715afc4dc
commit a98610913a
2 changed files with 4 additions and 1 deletions
@@ -73,6 +73,7 @@
:prefilter="prefilter"
:selection="selected"
:processing="processing"
:preselected-fields="fields.map(({ moduleField }) => moduleField)"
class="mr-1 float-left"
@export="onExport"
/>
@@ -487,7 +487,9 @@ export default {
preselectedFields: {
handler (value) {
this.fields = value.filter(f => this.disabledTypes.indexOf(f.kind) < 0)
if (!this.fields.length) {
this.fields = value.filter(f => this.disabledTypes.indexOf(f.kind) < 0)
}
},
immediate: true,
},