Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createModel(): JSONModel {
return new JSONModel({
data: [
{ index: 0, a: 'other', b: 'match 1' },
{ index: 1, a: 'other', b: 'match 2' }
],
schema: {
primaryKey: ['index'],
fields: [
{
name: 'a'
},
{ name: 'b' }
]
}
});
}
function createGridSearchService(model: JSONModel): GridSearchService {
function main(): void {
let model1 = new LargeDataModel();
let model2 = new StreamingDataModel();
let model3 = new RandomDataModel(15, 10);
let model4 = new RandomDataModel(80, 80);
let model5 = new JSONModel(Data.cars);
let blueStripeStyle: DataGrid.Style = {
...DataGrid.defaultStyle,
rowBackgroundColor: i => i % 2 === 0 ? 'rgba(138, 172, 200, 0.3)' : '',
columnBackgroundColor: i => i % 2 === 0 ? 'rgba(100, 100, 100, 0.1)' : ''
};
let brownStripeStyle: DataGrid.Style = {
...DataGrid.defaultStyle,
columnBackgroundColor: i => i % 2 === 0 ? 'rgba(165, 143, 53, 0.2)' : ''
};
let greenStripeStyle: DataGrid.Style = {
...DataGrid.defaultStyle,
rowBackgroundColor: i => i % 2 === 0 ? 'rgba(64, 115, 53, 0.2)' : ''
};