简体   繁体   English

在 ag-grid mo 的 vue 中找到 columnGroupShow

[英]columnGroupShow in vue of ag-grid mo found

my html我的 html

              <ag-grid-vue style="height: 100%;"
                 class="ag-theme-alpine"
                 :columnDefs="columnDefs"
                 :rowData="records"
                 :gridOptions="gridOptions"
                 :defaultColDef="defaultColDef"
                 :debug="true"
                 >
             </ag-grid-vue>

my json headers我的 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: ''},
            ],
        },
      }

I would like to hide or show the columns that I have, but when setting the configuration the columngroupshow in open or closed does not work in the html我想隐藏或显示我拥有的列,但是在设置配置时,打开或关闭的 columngroupshow 在 html 中不起作用

not found is group show in column, please help未找到是列中的组显示,请帮助

The issue is that all of the children columns have columnGroupShow:'open' .问题是所有子列都有columnGroupShow:'open' In other words, this has no effect .换句话说,这没有任何效果

To fix this, have one column that has columnGroupShow:'closed' or without the property at all.要解决此问题,请有列具有columnGroupShow:'closed'或根本没有该属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM