How to use the terra-table.Utils.canToggleArrayValue function in terra-table

To help you get started, we’ve selected a few terra-table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerner / terra-core / packages / terra-table / src / terra-dev-site / doc / guides / MultiSelectTable.jsx View on Github external
const createRow = rowData => (
    {
      key: rowData.key,
      cells: createCellsForRow(rowData.cells),
      isDisabled: !Utils.canToggleArrayValue(maxSectionCount, selectedKeys, rowData.key),
      toggleAction: {
        metaData: { key: rowData.key },
        onToggle: handleRowToggle,
        isToggled: selectedKeys.indexOf(rowData.key) >= 0,
        toggleLabel: rowData.toggleText,
      },
    }
  );