javascript - 在 ag-grid mo 的 vue 中找到 columnGroupShow
问题描述
我的 html
<ag-grid-vue style="height: 100%;"
class="ag-theme-alpine"
:columnDefs="columnDefs"
:rowData="records"
:gridOptions="gridOptions"
:defaultColDef="defaultColDef"
:debug="true"
>
</ag-grid-vue>
我的 json 标头
this.columnDefs = [
{
headerName:'Datos del productos',
children:[
{headerName:'Código Interno', columnGroupShow: 'open', field: 'internal_id', },
{headerName:'Unidad', columnGroupShow: 'open', field: 'unit_type_id', width: 120,suppressSizeToFit:true, },
{headerName:'Nombre', columnGroupShow: 'open', field: 'name', },
{headerName:'Ver', columnGroupShow: 'open', filter:false , width: 80, suppressSizeToFit:true},
{headerName:'Descripción ampliada', columnGroupShow: 'open', field: 'description', width: 200, suppressSizeToFit:true},
{headerName:'Código Barras', columnGroupShow: 'open', field: 'barcode'},
{headerName:'Código SUNAT', columnGroupShow: 'open', field: 'item_code'},
{headerName:'Código de importación', columnGroupShow: 'open', field: ''},
],
},
}
我想隐藏或显示我拥有的列,但是在设置配置时,打开或关闭的 columngroupshow 在 html 中不起作用
未找到是列中的组显示,请帮助
解决方案
问题是所有子列都有columnGroupShow:'open'
. 换句话说,这没有任何效果。
要解决此问题,请让一列具有columnGroupShow:'closed'
或不具有该属性。
推荐阅读
- html - 如何使联系表格居中并将某些输入放在某些行上
- swing - 如何修复“(java:22494):Gdk-WARNING ...”
- asp.net - 在asp.net的文本框中绑定默认文本
- plsql - 来自多个表的总和
- mysql - 如何加入两个都有 COUNT 和分组的查询而不头疼?
- regex - 默认 AWS 私有主机名的正则表达式
- database-normalization - 化为第一范式
- neo4j - 如何使用 Kafka 和 neo4j-streams 配置 Neo4j 接收器实例
- python - 将多个键/值关联到 defaultdict(list)
- spring - 使用 Oauth2 的 SPA 和简单后端 - 使用 http 会话的方式