nativescript-filter-select
nativescript-filter-select copied to clipboard
Programatically set 'selected' when 'multiple' = false
Hi,
I've tried setting the 'selected' property but doesn't work for me. Selected takes in an array of values, and since my filter select has multiple="false". I tried setting an array with just the selected item then setting the filterSelect.selected property but it isn't updating the label on the UI..
var selectedItem = new Array<PartyFilterSelectItem>();
selectedItem.push(new PartyFilterSelectItem(this.motorCarrierId, this.motorCarrierName));
let responsiblePartyFilterSelect = <any>this.page.getViewById('bookingResponsiblePartyFilterSelect'); responsiblePartyFilterSelect.selected = selectedItem;
Any help would be appreciated, thanks!
@tylerablake can you make example here https://play.nativescript.org so i can help you faster