Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(columnIndex, index) => {
const column = visibleColumns[columnIndex];
let colSpan: number;
if (!mergeDuplicateHeaders) {
colSpan = 1;
} else {
if (columnIndex === R.last(indices)) {
colSpan = labels.length - columnIndex;
} else {
colSpan = indices[index + 1] - columnIndex;
}
}
const clearable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.clearable);
const deletable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.deletable);
const hideable = getColumnFlag(headerRowIndex, lastRow, column.hideable);
const renamable = getColumnFlag(headerRowIndex, lastRow, column.renamable);
const selectable = getColumnFlag(headerRowIndex, lastRow, column.selectable);
const spansAllColumns = visibleColumns.length === colSpan;
const affectedColumns = actions.getAffectedColumns(
column,
columns,
headerRowIndex,
mergeDuplicateHeaders,
true
);
const allSelected =
selectable &&
(columnIndex, index) => {
const column = visibleColumns[columnIndex];
let colSpan: number;
if (!mergeDuplicateHeaders) {
colSpan = 1;
} else {
if (columnIndex === R.last(indices)) {
colSpan = labels.length - columnIndex;
} else {
colSpan = indices[index + 1] - columnIndex;
}
}
const clearable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.clearable);
const deletable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.deletable);
const hideable = getColumnFlag(headerRowIndex, lastRow, column.hideable);
const renamable = getColumnFlag(headerRowIndex, lastRow, column.renamable);
const selectable = getColumnFlag(headerRowIndex, lastRow, column.selectable);
const spansAllColumns = visibleColumns.length === colSpan;
const affectedColumns = actions.getAffectedColumns(
column,
columns,
headerRowIndex,
mergeDuplicateHeaders,
true
);
const allSelected =
selectable &&
(
let colSpan: number;
if (!mergeDuplicateHeaders) {
colSpan = 1;
} else {
if (columnIndex === R.last(indices)) {
colSpan = labels.length - columnIndex;
} else {
colSpan = indices[index + 1] - columnIndex;
}
}
const clearable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.clearable);
const deletable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.deletable);
const hideable = getColumnFlag(headerRowIndex, lastRow, column.hideable);
const renamable = getColumnFlag(headerRowIndex, lastRow, column.renamable);
const selectable = getColumnFlag(headerRowIndex, lastRow, column.selectable);
const spansAllColumns = visibleColumns.length === colSpan;
const affectedColumns = actions.getAffectedColumns(
column,
columns,
headerRowIndex,
mergeDuplicateHeaders,
true
);
const allSelected =
selectable &&
(
column_selectable !== 'single' ||
(selected_columns.length === affectedColumns.length)
const column = visibleColumns[columnIndex];
let colSpan: number;
if (!mergeDuplicateHeaders) {
colSpan = 1;
} else {
if (columnIndex === R.last(indices)) {
colSpan = labels.length - columnIndex;
} else {
colSpan = indices[index + 1] - columnIndex;
}
}
const clearable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.clearable);
const deletable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.deletable);
const hideable = getColumnFlag(headerRowIndex, lastRow, column.hideable);
const renamable = getColumnFlag(headerRowIndex, lastRow, column.renamable);
const selectable = getColumnFlag(headerRowIndex, lastRow, column.selectable);
const spansAllColumns = visibleColumns.length === colSpan;
const affectedColumns = actions.getAffectedColumns(
column,
columns,
headerRowIndex,
mergeDuplicateHeaders,
true
);
const allSelected =
selectable &&
(
column_selectable !== 'single' ||
{R.unnest(labelsAndIndices.map(([, indices], i) => indices.map((index, j) => {
const spansAllColumns = indices.length === 1;
const column = columns[index];
const checked = !hidden_columns || hidden_columns.indexOf(column.id) < 0;
const hideable = getColumnFlag(i, lastRow, column.hideable);
const disabled = (spansAllColumns && checked) || (!hideable && checked);
return {
i: index,
j,
component: !hideable ? null : (<div>
<input disabled="{disabled}" checked="{checked}" type="checkbox">
<label>{!column.name ?
column.id :
typeof column.name === 'string' ?</label></div>
let colSpan: number;
if (!mergeDuplicateHeaders) {
colSpan = 1;
} else {
if (columnIndex === R.last(indices)) {
colSpan = labels.length - columnIndex;
} else {
colSpan = indices[index + 1] - columnIndex;
}
}
const clearable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.clearable);
const deletable = paginationMode !== TableAction.Custom && getColumnFlag(headerRowIndex, lastRow, column.deletable);
const hideable = getColumnFlag(headerRowIndex, lastRow, column.hideable);
const renamable = getColumnFlag(headerRowIndex, lastRow, column.renamable);
const selectable = getColumnFlag(headerRowIndex, lastRow, column.selectable);
const spansAllColumns = visibleColumns.length === colSpan;
const affectedColumns = actions.getAffectedColumns(
column,
columns,
headerRowIndex,
mergeDuplicateHeaders,
true
);
const allSelected =
selectable &&
(
column_selectable !== 'single' ||
(selected_columns.length === affectedColumns.length)
) &&