隐藏列时,ag-grid无法移动组列

时间:2019-05-22 08:04:15

标签: ag-grid

我正在使用带有组列的ag-grid。当组之一中有隐藏列时,我无法手动移动组列。

这些是列定义,“运动员”列被隐藏:

this.columnDefs = [
      {
        headerName: "Athlete Details",
        pinned: null, 
        lockPinned: true,
        marryChildren: true,
        children: [
          {
            headerName: "Athlete",
            field: "athlete",
            width: 150,
            hide: true,
            pinned: null,
            lockPinned: true
          },
          {
            headerName: "Age",
            field: "age",
            width: 90,
            pinned: null,
            lockPinned: true
          },
          {
            headerName: "Country",
            field: "country",
            width: 120,
            pinned: null,
            lockPinned: true
          }
        ]
      },
      {
        headerName: "Sports Results",
        pinned: null, 
        lockPinned: true,
        marryChildren: true,
        children: [
          {
            headerName: "Sport",
            field: "sport",
            width: 110,
            pinned: null,
            lockPinned: true
          },
          {
            headerName: "Total",
            field: "total",
            width: 100,
            pinned: null,
            lockPinned: true
          },
          {
            headerName: "Gold",
            field: "gold",
            width: 100,
            pinned: null,
            lockPinned: true
          },
          {
            headerName: "Silver",
            field: "silver",
            width: 100,
            filter: "agNumberColumnFilter",
            pinned: null,
            lockPinned: true
          },
          {
            headerName: "Bronze",
            field: "bronze",
            width: 100,
            pinned: null,
            lockPinned: true
          }
        ]
      }

这是一个带有完整示例的插件演示:https://plnkr.co/edit/jjeDCsswWT0BnPwGGtjU?p=preview

在此示例中,“运动员”列是隐藏的。 将“运动员成绩”组列拖到右侧后,就无法将“运动成绩”组列拖到右侧。 一旦从“运动员”列中删除了hide = true,便可以正常工作。

0 个答案:

没有答案