2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

refactor: quickeditform query issue

- markRaw report data
This commit is contained in:
18alantom 2022-02-11 15:55:49 +05:30
parent 9f65a9ba9e
commit cab5283a92
3 changed files with 10 additions and 6 deletions

View File

@ -88,7 +88,7 @@ import { openQuickEdit, getActionsForDocument } from '@/utils';
export default {
name: 'QuickEditForm',
props: ['doctype', 'name', 'values', 'hideFields', 'showFields'],
props: ['doctype', 'name', 'valueJSON', 'hideFields', 'showFields'],
components: {
Button,
FormControl,
@ -106,9 +106,13 @@ export default {
},
};
},
mounted() {
this.values = JSON.parse(this.valueJSON);
},
data() {
return {
doc: null,
values: null,
titleField: null,
imageField: null,
statusText: null,

View File

@ -107,7 +107,7 @@ import WithScroll from '@/components/WithScroll';
import FormControl from '@/components/Controls/FormControl';
import DropdownWithActions from '../components/DropdownWithActions.vue';
import reportViewConfig from '@/../reports/view';
import { h } from 'vue';
import { h, markRaw } from 'vue';
export default {
name: 'Report',
@ -165,16 +165,16 @@ export default {
rows = data;
}
this.reportData.columns = this.report.getColumns({
this.reportData.columns = markRaw(this.report.getColumns({
filters: this.filters,
data,
});
}));
if (!rows) {
rows = [];
}
this.reportData.rows = this.addTreeMeta(rows);
this.reportData.rows = markRaw(this.addTreeMeta(rows));
this.loading = false;
},

View File

@ -163,7 +163,7 @@ export function openQuickEdit({
name,
showFields: showFields ?? getShowFields(doctype),
hideFields,
values: defaults,
valueJSON: stringifyCircular(defaults),
lastRoute: currentRoute,
},
});