fix: hide columns when applicable, for simple grid table element
This commit is contained in:
parent
9435baebef
commit
81fa500fb0
|
@ -2,18 +2,20 @@
|
||||||
<${b}-table :data="gridContext['${grid.key}'].data">
|
<${b}-table :data="gridContext['${grid.key}'].data">
|
||||||
|
|
||||||
% for column in grid.get_vue_columns():
|
% for column in grid.get_vue_columns():
|
||||||
<${b}-table-column field="${column['field']}"
|
% if not column['hidden']:
|
||||||
label="${column['label']}"
|
<${b}-table-column field="${column['field']}"
|
||||||
v-slot="props"
|
label="${column['label']}"
|
||||||
:sortable="${json.dumps(column.get('sortable', False))|n}"
|
v-slot="props"
|
||||||
cell-class="c_${column['field']}">
|
:sortable="${json.dumps(column.get('sortable', False))|n}"
|
||||||
% if grid.is_linked(column['field']):
|
cell-class="c_${column['field']}">
|
||||||
<a :href="props.row._action_url_view"
|
% if grid.is_linked(column['field']):
|
||||||
v-html="props.row.${column['field']}" />
|
<a :href="props.row._action_url_view"
|
||||||
% else:
|
v-html="props.row.${column['field']}" />
|
||||||
<span v-html="props.row.${column['field']}"></span>
|
% else:
|
||||||
% endif
|
<span v-html="props.row.${column['field']}"></span>
|
||||||
</${b}-table-column>
|
% endif
|
||||||
|
</${b}-table-column>
|
||||||
|
% endif
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
% if grid.actions:
|
% if grid.actions:
|
||||||
|
|
Loading…
Reference in a new issue