ng-multiselect-dropdown – TypeError: Cannot read property 'idField' of undefined

Issue

Followed steps as per
https://www.npmjs.com/package/ng-multiselect-dropdown for angular 9

received below error in browser console

TypeError: Cannot read property ‘idField’ of undefined

Solution

I had the same issue and I solved but moving [settings] param prior to [data] para.

Example:

    <ng-multiselect-dropdown
        [settings]="dropdownSettings"
        [data]="dropdownList"
        [(ngModel)]="selectedItems"
    >
    </ng-multiselect-dropdown>

Answered By – Abraham Cm

Answer Checked By – Robin (AngularFixing Admin)

Leave a Reply

Your email address will not be published.