Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
filterable: true,
filter: {
model: Filters.multipleSelect,
collection: [{ value: 'acme', label: 'Acme' }, { value: 'abc', label: 'Company ABC' }, { value: 'xyz', label: 'Company XYZ' }],
filterOptions: {
filter: true // adds a filter on top of the multi-select dropdown
}
}
},
{ id: 'billing.address.street', field: 'billing.address.street', headerKey: 'BILLING.ADDRESS.STREET', width: 60, filterable: true, sortable: true },
{
id: 'billing.address.zip', field: 'billing.address.zip', headerKey: 'BILLING.ADDRESS.ZIP', width: 60,
type: FieldType.number,
filterable: true, sortable: true,
filter: {
model: Filters.compoundInput
},
formatter: Formatters.multiple, params: { formatters: [Formatters.complexObject, Formatters.translate] }
},
];
this.gridOptions = {
enableAutoResize: false,
enableFiltering: true,
enableCellNavigation: true,
enableCheckboxSelector: true,
enableRowSelection: true,
enableTranslate: true,
i18n: this.i18n,
gridMenu: {
resizeOnShowHeaderRow: true,
},
for (let i = 0; i < NB_ITEMS; i++) {
multiSelectFilterArray.push({ value: i, label: i });
}
this.columnDefinitions = [
{
id: 'title',
name: 'Title',
field: 'title',
headerKey: 'TITLE',
filterable: true,
sortable: true,
type: FieldType.string,
minWidth: 45, width: 100,
filter: {
model: Filters.compoundInput
}
},
{
id: 'description', name: 'Description', field: 'description', filterable: true, sortable: true, minWidth: 80, width: 100,
type: FieldType.string,
filter: {
model: Filters.input
}
},
{
id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true, type: FieldType.number, exportCsvForceToKeepAsString: true,
minWidth: 55, width: 100,
headerKey: 'DURATION',
filterable: true,
filter: {
collection: multiSelectFilterArray,
for (let i = 0; i < NB_ITEMS; i++) {
multiSelectFilterArray.push({ value: i, label: i });
}
this.columnDefinitions = [
{
id: 'title',
name: 'Title',
field: 'title',
headerKey: 'TITLE',
filterable: true,
sortable: true,
type: FieldType.string,
minWidth: 45, width: 100,
filter: {
model: Filters.compoundInput
}
},
{
id: 'description', name: 'Description', field: 'description', filterable: true, sortable: true, minWidth: 80, width: 100,
type: FieldType.string,
filter: {
model: Filters.input
}
},
{
id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true, type: FieldType.number, exportCsvForceToKeepAsString: true,
minWidth: 55, width: 100,
headerKey: 'DURATION',
filterable: true,
filter: {
collection: multiSelectFilterArray,
defineGrid() {
this.columnDefinitions = [
{
id: 'name', name: 'Name', field: 'name', sortable: true, type: FieldType.string,
filterable: true,
filter: {
model: Filters.compoundInput
}
},
{
id: 'gender', name: 'Gender', field: 'gender', filterable: true, sortable: true,
filter: {
model: Filters.singleSelect,
collection: [{ value: '', label: '' }, { value: 'male', label: 'male' }, { value: 'female', label: 'female' }]
}
},
{ id: 'company', name: 'Company', field: 'company' }
];
this.gridOptions = {
enableAutoResize: true,
autoResize: {
containerId: 'demo-container',
defineGrid() {
this.columnDefinitions = [
{
id: 'name', name: 'Name', field: 'name', sortable: true, type: FieldType.string,
filterable: true,
filter: {
model: Filters.compoundInput
}
},
{
id: 'gender', name: 'Gender', field: 'gender', filterable: true, sortable: true,
filter: {
model: Filters.singleSelect,
collection: [{ value: '', label: '' }, { value: 'male', label: 'male' }, { value: 'female', label: 'female' }]
}
},
{ id: 'company', name: 'Company', field: 'company' }
];
this.gridOptions = {
enableAutoResize: true,
autoResize: {
containerId: 'demo-container',
{
id: 'company', field: 'company', headerKey: 'COMPANY', width: 60,
sortable: true,
filterable: true,
filter: {
model: Filters.multipleSelect,
collection: [{ value: 'acme', label: 'Acme' }, { value: 'abc', label: 'Company ABC' }, { value: 'xyz', label: 'Company XYZ' }]
}
},
{ id: 'billing.address.street', field: 'billing.address.street', headerKey: 'BILLING.ADDRESS.STREET', width: 60, filterable: true, sortable: true },
{
id: 'billing.address.zip', field: 'billing.address.zip', headerKey: 'BILLING.ADDRESS.ZIP', width: 60,
type: FieldType.number,
filterable: true, sortable: true,
filter: {
model: Filters.compoundInput
},
formatter: Formatters.multiple, params: { formatters: [Formatters.complexObject, Formatters.translate] }
}
];
this.gridOptions = {
enableAutoResize: false,
enableFiltering: true,
enableCellNavigation: true,
enableCheckboxSelector: true,
enableRowSelection: true,
enableTranslate: true,
i18n: this.i18n,
gridMenu: {
resizeOnShowHeaderRow: true
},