ng2-select2-demo
ng2-select2-demo copied to clipboard
Select2 data is not getting updated on Dynamic loading.
Data is loading at the very first time with async pipe. After reloading the API dataset is not getting reflected to select2.
There is no direct method to clear/update the new values in UI.. but by clearing the "data" to empty array and reassign the values make trick.
this.data = []; this.data = this.actualData; //from your server this.selectedData = data.selectedData //from your server (here your new values get updated in select2 UI)