How to use the dash-table/derived/header/columnFlag function in dash-table

To help you get started, we’ve selected a few dash-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 plotly / dash-table / src / dash-table / derived / header / content.tsx View on Github external
(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 &&
github plotly / dash-table / src / dash-table / derived / header / content.tsx View on Github external
(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 &&
                        (
github plotly / dash-table / src / dash-table / derived / header / content.tsx View on Github external
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)
github plotly / dash-table / src / dash-table / derived / header / content.tsx View on Github external
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' ||
github plotly / dash-table / src / dash-table / components / ControlledTable / index.tsx View on Github external
{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>
github plotly / dash-table / src / dash-table / derived / header / content.tsx View on Github external
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)
                        ) &&