Use new createAutocompleter for selectFields. This is the preparation for special selectFields that enable creating new elements from within the autocompleter.
parent
04513e5b12
commit
f4c67ec873
@ -1,15 +1,10 @@ |
||||
<ng-select [(ngModel)]="selectedOption" |
||||
[ngClass]="'wp-inline-edit--field'" |
||||
[required]="required" |
||||
[clearable]="!required" |
||||
[disabled]="inFlight" |
||||
[id]="handler.htmlId" |
||||
[items]="valueOptions" |
||||
bindLabel="name" |
||||
[virtualScroll]="true" |
||||
(keydown)="handler.handleUserKeydown($event, true)" |
||||
(change)="handler.handleUserSubmit()" |
||||
(open)="onOpen()" |
||||
(close)="onClose()" |
||||
[appendTo]="appendTo"> |
||||
</ng-select> |
||||
<ndc-dynamic [ndcDynamicComponent]="autocompleterComponent()" |
||||
[ndcDynamicInputs]="{ availableValues: valueOptions, |
||||
appendTo: appendTo, |
||||
model: selectedOption ? selectedOption : '', |
||||
required: required, |
||||
disabled: inFlight, |
||||
id: handler.htmlId }" |
||||
[ndcDynamicOutputs]="referenceOutputs" |
||||
[ndcDynamicAttributes]="{ class: 'wp-inline-edit--field' }"> |
||||
</ndc-dynamic> |
||||
|
Loading…
Reference in new issue