Allow grid columns to be *invisible* (but still present in grid)

this can be useful when you need contextual data for a given row, for
sake of front-end UI features, but do not want to actually show the
extra data column(s)
This commit is contained in:
Lance Edgar 2021-08-29 10:28:36 -05:00
parent fe584f193f
commit 4d742bacb1
2 changed files with 32 additions and 2 deletions

View file

@ -176,7 +176,10 @@
<template slot-scope="props">
% for column in grid_columns:
<b-table-column field="${column['field']}" label="${column['label']}" ${'sortable' if column['sortable'] else ''}>
<b-table-column field="${column['field']}"
label="${column['label']}"
:sortable="${json.dumps(column['sortable'])}"
:visible="${json.dumps(column['visible'])}">
% if grid.is_linked(column['field']):
<a :href="props.row._action_url_view" v-html="props.row.${column['field']}"></a>
% else: