Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...DataGrid.defaultStyle,
rowBackgroundColor: i => i % 2 === 0 ? 'rgba(64, 115, 53, 0.2)' : ''
};
let lightSelectionStyle: DataGrid.Style = {
...DataGrid.defaultStyle,
selectionFillColor: 'rgba(255, 255, 255, 0.2)',
selectionBorderColor: 'white',
headerSelectionBorderColor: 'white',
cursorBorderColor: 'white'
};
let fgColorFloatRenderer = new TextRenderer({
font: 'bold 12px sans-serif',
textColor: redGreenBlack,
format: TextRenderer.formatFixed({ digits: 2 }),
horizontalAlignment: 'right'
});
let bgColorFloatRenderer = new TextRenderer({
textColor: heatMapViridisInverse,
backgroundColor: heatMapViridis,
format: TextRenderer.formatFixed({ digits: 2 }),
horizontalAlignment: 'right'
});
let grid1 = new DataGrid({ style: blueStripeStyle });
grid1.dataModel = model1;
grid1.keyHandler = new BasicKeyHandler();
grid1.mouseHandler = new BasicMouseHandler();
grid1.selectionModel = new BasicSelectionModel({ dataModel: model1 });