You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
reinoboonstra
added a commit
to reinoboonstra/angular2-multiselect-dropdown
that referenced
this issue
Apr 1, 2022
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.
The text was updated successfully, but these errors were encountered: