Pass Object to SelectOptions
I have the following object gridData.SupplierName = [{'a', 'b', 'c'}];
I want to pass this object into
{ name: 'Supplier', field: 'SupplierName', enableCellEdit: false, allowCellFocus: false, filter: { term: '', selectOptions: gridData.Subject, type: uiGridConstants.filter.SELECT } },
But when I do this I get tons of undefined objects in the select combobox. Is there a way in which I can do something like a key/value pair from that object or an object I can pass to the grid to make it display key/value correctly.
Thank you.
i believe you need to provide gridData.Subject in this format: selectOptions: [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ]
value and label, so grid will understand ur datasource for combobox display.
Please use stack overflow and gitter for questions in future. Also check tutorials.