Cannot add property 0, object is not extensible, when selecting new items in multiple groupby mode
Getting this js error 'Cannot add property 0, object is not extensible' when selecting an item in my list. Context: This is my HTML: <angular2-multiselect [data]="countriesRegionsData" formControlName="countriesRegions" [settings]="settings"> These are my settings: public settings = { singleSelection: false, text: 'Select Fields', selectAllText: 'Select All', unSelectAllText: 'UnSelect All', searchPlaceholderText: 'Search Fields', enableSearchFilter: true, badgeShowLimit: 5, primaryKey: 'countryCode', labelKey: 'countryName', groupBy: 'regionName' }; This is the object I use: export interface ICountryRegion { regionId: string; regionName: string; countryCode: string; countryName: string; } I use version 5.0.4 It goes wrong on line 1649 of angular2-multiselect-dropdown.js: this.selectedItems.push(item); This could probably be replaced by [...this.selectedItems, item]; i.e. making a new copy of the array.