Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.add('default', () => ());
.add('with 1 column', () => ());
const getter = (
page_action: TableAction,
page_current: number,
page_size: number,
setProps: SetProps,
data: Data
): IPaginator => {
switch (page_action) {
case TableAction.None:
return getNoPagination();
case TableAction.Native:
return getFrontEndPagination(page_current, page_size, setProps, data);
case TableAction.Custom:
return getBackEndPagination(page_current, setProps);
default:
throw new Error(`Unknown pagination mode: '${page_action}'`);
}
};
columns,
headerRowIndex,
setProps,
mergeDuplicateHeaders,
column_selectable === 'single',
!allSelected
)}
name={`column-select-${id}`}
type={column_selectable === 'single' ?
'radio' :
'checkbox'
}
/>
}
{sort_action === TableAction.None || !isLastRow ?
null :
(<span>
</span>)
}
{!renamable ?
null :
(<span>
</span>
fixed_rows,
rawTable,
virtualized.offset.rows
);
const classes = [
'dash-spreadsheet',
...(virtualization ? ['dash-virtualized'] : []),
...(fixed_rows ? ['dash-freeze-top'] : []),
...(fixed_columns ? ['dash-freeze-left'] : []),
...(style_as_list_view ? ['dash-list-view'] : []),
...(empty[0][1] ? ['dash-empty-01'] : []),
...(empty[1][1] ? ['dash-empty-11'] : []),
...(visibleColumns.length ? [] : ['dash-no-columns']),
...(virtualized.data.length ? [] : ['dash-no-data']),
...(filter_action !== TableAction.None ? [] : ['dash-no-filter']),
...(fill_width ? ['dash-fill-width'] : []),
...(loading_state ? ['dash-loading'] : [])
];
const containerClasses = ['dash-spreadsheet-container', ...classes];
const innerClasses = ['dash-spreadsheet-inner', ...classes];
const tableStyle = this.calculateTableStyle(style_table);
const gridStyle = derivedTableFragmentStyles(
virtualization,
uiCell,
uiHeaders,
uiViewport,
viewport,
virtualized.padding.rows,
scrollbarWidth
const getter = (
page_action: TableAction,
page_current: number,
page_size: number,
data: Data,
indices: Indices
): IDerivedData => {
switch (page_action) {
case TableAction.None:
return getNoPagination(data, indices);
case TableAction.Native:
return getFrontEndPagination(page_current, page_size, data, indices);
case TableAction.Custom:
return getBackEndPagination(data, indices);
default:
throw new Error(`Unknown pagination mode: '${page_action}'`);
}
};
bbb: {
clearable: true,
options: ['Humid', 'Wet', 'Snowy', 'Tropical Beaches'].map(i => ({
label: `label: ${i}`,
value: i
}))
},
'bbb-readonly': {
clearable: true,
options: ['Humid', 'Wet', 'Snowy', 'Tropical Beaches'].map(i => ({
label: `label: ${i}`,
value: i
}))
}
},
page_action: TableAction.None,
style_table: {
maxHeight: '800px',
height: '800px',
maxWidth: '1000px',
width: '1000px'
},
style_cell: {
maxWidth: 150,
minWidth: 150,
width: 150
},
style_cell_conditional: [
{ if: { column_id: 'rows' }, maxWidth: 60, minWidth: 60, width: 60 },
{ if: { column_id: 'bbb' }, maxWidth: 200, minWidth: 200, width: 200 },
{ if: { column_id: 'bbb-readonly' }, maxWidth: 200, minWidth: 200, width: 200 }
]
filterOpEdges: IEdgesMatrices | undefined
) {
const {
filter_action,
map,
row_deletable,
row_selectable,
setFilter,
style_cell,
style_cell_conditional,
style_filter,
style_filter_conditional,
visibleColumns
} = this.props;
if (filter_action === TableAction.None) {
return NO_FILTERS;
}
const relevantStyles = this.relevantStyles(
style_cell,
style_filter,
style_cell_conditional,
style_filter_conditional
);
const wrapperStyles = this.wrapperStyles(
this.filterStyles(visibleColumns, relevantStyles),
filterEdges
);
const opStyles = this.filterOpStyles(