Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
StringColumn({
title: 'string',
mapDataToValue: (data: RowDataT) => data[1],
}),
NumericalColumn({
title: 'three',
mapDataToValue: (data: RowDataT) => data[2],
}),
NumericalColumn({
title: 'neg std',
highlight: n => n < 0,
mapDataToValue: (data: RowDataT) => data[3],
}),
NumericalColumn({
title: 'accounting',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[4],
}),
CustomColumn<{color: string}, {}>({
title: 'custom color',
mapDataToValue: (data: RowDataT) => data[5],
renderCell: function Cell(props) {
const [css] = useStyletron();
return (
<div>
</div>
StringColumn({
title: 'string',
mapDataToValue: (data: RowDataT) => data[1],
}),
NumericalColumn({
title: 'three',
mapDataToValue: (data: RowDataT) => data[2],
}),
NumericalColumn({
title: 'neg std',
highlight: (n: number) => n < 0,
mapDataToValue: (data: RowDataT) => data[3],
}),
NumericalColumn({
title: 'accounting',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[4],
}),
CustomColumn<{color: string}, {}>({
title: 'custom color',
mapDataToValue: (data: RowDataT) => data[5],
renderCell: function Cell(props: any) {
const [css] = useStyletron();
return (
<div>
</div>
BooleanColumn({
title: 'is it good?',
mapDataToValue: (data: RowDataT) => data[1],
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data[2],
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[3],
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[4],
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data[5],
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
mapDataToValue: (data: RowDataT) => data[6],
}),
];
const initialRows = [
['Avatar', false, 'Action', 237, 2784, 11.7, 8.0],
maxWidth: 300,
lineClamp: 3,
mapDataToValue: (data: RowDataT) => data.loremIpsum,
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data.genre,
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.budget,
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.boxOffice,
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data.roi,
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
mapDataToValue: (data: RowDataT) => data.imdb,
}),
];
const rows = [
BooleanColumn({
title: 'is it good?',
mapDataToValue: (data: RowDataT) => data[1],
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data[2],
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[3],
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[4],
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data[5],
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
mapDataToValue: (data: RowDataT) => data[6],
}),
];
const initialRows = [
['Avatar', false, 'Action', 237, 2784, 11.7, 8.0],
title: 'Movie Title',
mapDataToValue: (data: RowDataT) => data.title,
}),
StringColumn({
title: 'Lorem Ipsum Description',
maxWidth: 300,
lineClamp: 3,
mapDataToValue: (data: RowDataT) => data.loremIpsum,
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data.genre,
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.budget,
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.boxOffice,
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data.roi,
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
title: 'Movie Title',
mapDataToValue: (data: RowDataT) => data.title,
}),
StringColumn({
title: 'Lorem Ipsum Description',
maxWidth: 300,
lineClamp: 3,
mapDataToValue: (data: RowDataT) => data.loremIpsum,
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data.genre,
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.budget,
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.boxOffice,
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data.roi,
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
const columns = [
StringColumn({
title: 'Movie',
mapDataToValue: (data: RowDataT) => data[0],
}),
BooleanColumn({
title: 'is it good?',
mapDataToValue: (data: RowDataT) => data[1],
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data[2],
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[3],
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[4],
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data[5],
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
mapDataToValue: (data: RowDataT) => data[6],
maxWidth: 300,
lineClamp: 3,
mapDataToValue: (data: RowDataT) => data.loremIpsum,
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data.genre,
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.budget,
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data.boxOffice,
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data.roi,
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
mapDataToValue: (data: RowDataT) => data.imdb,
}),
];
const rows = [
const columns = [
StringColumn({
title: 'Movie',
mapDataToValue: (data: RowDataT) => data[0],
}),
BooleanColumn({
title: 'is it good?',
mapDataToValue: (data: RowDataT) => data[1],
}),
CategoricalColumn({
title: 'Genre',
mapDataToValue: (data: RowDataT) => data[2],
}),
NumericalColumn({
title: 'Production Budget (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[3],
}),
NumericalColumn({
title: 'Box Office (millions)',
format: NUMERICAL_FORMATS.ACCOUNTING,
mapDataToValue: (data: RowDataT) => data[4],
}),
NumericalColumn({
title: 'ROI',
precision: 2,
mapDataToValue: (data: RowDataT) => data[5],
}),
NumericalColumn({
title: 'Rating IMDB',
precision: 2,
mapDataToValue: (data: RowDataT) => data[6],