Fixed #2271 - DataTable with edit, sort and filter options does not work as expected
parent
5323655dd1
commit
67ace50831
|
@ -1625,16 +1625,19 @@ export default {
|
||||||
},
|
},
|
||||||
onEditingMetaChange(event) {
|
onEditingMetaChange(event) {
|
||||||
let { data, field, index, editing } = event;
|
let { data, field, index, editing } = event;
|
||||||
let meta = this.d_editingMeta[index];
|
let editingMeta = { ...this.d_editingMeta };
|
||||||
|
let meta = editingMeta[index];
|
||||||
|
|
||||||
if (editing) {
|
if (editing) {
|
||||||
!meta && (meta = this.d_editingMeta[index] = { data: { ...data }, fields: [] });
|
!meta && (meta = editingMeta[index] = { data: { ...data }, fields: [] });
|
||||||
meta['fields'].push(field);
|
meta['fields'].push(field);
|
||||||
}
|
}
|
||||||
else if (meta) {
|
else if (meta) {
|
||||||
const fields = meta['fields'].filter(f => f !== field);
|
const fields = meta['fields'].filter(f => f !== field);
|
||||||
!fields.length ? (delete this.d_editingMeta[index]) : (meta['fields'] = fields);
|
!fields.length ? (delete editingMeta[index]) : (meta['fields'] = fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.d_editingMeta = editingMeta;
|
||||||
},
|
},
|
||||||
clearEditingMetaData() {
|
clearEditingMetaData() {
|
||||||
if (this.editMode) {
|
if (this.editMode) {
|
||||||
|
|
Loading…
Reference in New Issue