Merge pull request #575 from frappe/develop
This commit is contained in:
commit
b77591f70f
@ -255,6 +255,8 @@ def get_data(
|
|||||||
if hasattr(_list, "default_list_data"):
|
if hasattr(_list, "default_list_data"):
|
||||||
default_rows = _list.default_list_data().get("rows")
|
default_rows = _list.default_list_data().get("rows")
|
||||||
|
|
||||||
|
meta = frappe.get_meta(doctype)
|
||||||
|
|
||||||
if view_type != "kanban":
|
if view_type != "kanban":
|
||||||
if columns or rows:
|
if columns or rows:
|
||||||
custom_view = True
|
custom_view = True
|
||||||
@ -296,6 +298,11 @@ def get_data(
|
|||||||
if column.get("key") == "_liked_by" and column.get("width") == "10rem":
|
if column.get("key") == "_liked_by" and column.get("width") == "10rem":
|
||||||
column["width"] = "50px"
|
column["width"] = "50px"
|
||||||
|
|
||||||
|
# remove column if column.hidden is True
|
||||||
|
column_meta = meta.get_field(column.get("key"))
|
||||||
|
if column_meta and column_meta.get("hidden"):
|
||||||
|
columns.remove(column)
|
||||||
|
|
||||||
# check if rows has group_by_field if not add it
|
# check if rows has group_by_field if not add it
|
||||||
if group_by_field and group_by_field not in rows:
|
if group_by_field and group_by_field not in rows:
|
||||||
rows.append(group_by_field)
|
rows.append(group_by_field)
|
||||||
|
|||||||
@ -461,7 +461,12 @@ const export_all = ref(false)
|
|||||||
|
|
||||||
async function exportRows() {
|
async function exportRows() {
|
||||||
let fields = JSON.stringify(list.value.data.columns.map((f) => f.key))
|
let fields = JSON.stringify(list.value.data.columns.map((f) => f.key))
|
||||||
let filters = JSON.stringify(list.value.params.filters)
|
|
||||||
|
let filters = JSON.stringify({
|
||||||
|
...props.filters,
|
||||||
|
...list.value.params.filters,
|
||||||
|
})
|
||||||
|
|
||||||
let order_by = list.value.params.order_by
|
let order_by = list.value.params.order_by
|
||||||
let page_length = list.value.params.page_length
|
let page_length = list.value.params.page_length
|
||||||
if (export_all.value) {
|
if (export_all.value) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user