Hi, when I statically assign elements to a list box, all the toolbar buttons work as expected. But, if I populate it using data remotely, the toolbar buttons are disabled. The only button that works for me is "moveAllTo". Do I have to referesh the listBox some way, so that it detects the new items that were added to it inside a promise?
it works when I do it this way:
public dataA: { [key: string]: Object }[] = [
{ Name: 'Australia', Code: 'AU' },
{ Name: 'Bermuda', Code: 'BM' },
{ Name: 'Canada', Code: 'CA' },
{ Name: 'Cameroon', Code: 'CM' },
{ Name: 'Denmark', Code: 'DK' },
{ Name: 'France', Code: 'FR' },
{ Name: 'Finland', Code: 'FI' },
{ Name: 'Germany', Code: 'DE' },
{ Name: 'Hong Kong', Code: 'HK' }
];
this.svc.getData(params).then( (classes)=>{
for (let item of lst['dataList']) {
this.listBoxDataSource = [... this.listBoxDataSource, { id: item['id'], name: item['name'] }]