We had version for Angular 4 (it worked with Angular 5.1.2. The newer didn't work at all for us: "TypeError: Object(...) is not a function").
We have
import { NgxSelectModule, INgxSelectOptions } from 'ngx-select-ex';
const CustomSelectOptions: INgxSelectOptions = { // Check the interface for more options
optionValueField: 'id',
optionTextField: 'text' //, keepSelectedItems: true
};
If the component is set as multiple, and I select any option, it will be added the way items are in alphabetical order. Demo does not do the same, bit it has no same interface. How to change this? We should only add to the end (and may me ordered with drag and drop, if needed, but it's another issue).
Can I do this with some attribute? Or how? Selected items added in order they are selected?
We had version for Angular 4 (it worked with Angular 5.1.2. The newer didn't work at all for us: "TypeError: Object(...) is not a function"). We have import { NgxSelectModule, INgxSelectOptions } from 'ngx-select-ex';
const CustomSelectOptions: INgxSelectOptions = { // Check the interface for more options optionValueField: 'id', optionTextField: 'text' //, keepSelectedItems: true }; If the component is set as multiple, and I select any option, it will be added the way items are in alphabetical order. Demo does not do the same, bit it has no same interface. How to change this? We should only add to the end (and may me ordered with drag and drop, if needed, but it's another issue).
Can I do this with some attribute? Or how? Selected items added in order they are selected?
<ngx-select id="{{obj.id}}" [defaultValue]="defaultValue" [items]="items" (select)="selected($event)" (remove)="removed($event)" (typed)="typed($event)" placeholder="{{placeholder}}" [multiple]="obj.multiple" [disabled]="obj.disabled" autoClearSearch="true" [allowClear]="true"