简体   繁体   中英

How to edit the field while using ng-select?

  • I have a dropdown field with values like 01.00, 02.00 etc.
  • After selecting any value from the dropdown, I should be able to to edit it.

ie If 02.00 from dropdown is selected, I can press backspace and change it to 02.30 by typing. Currently, I am unable to edit after selecting.

(I should be able to type/edit after selecting the value from the dropdown)

Time Dropdown Image -

时间下拉图像

<div class="col-sm-3">
       <label>{{'Pickup Time' | translate}}</label>
          <ng-select placeholder="Any Time" [virtualScroll]="true" formControlName="pickUpTime">
              <ng-option value="">Any Time</ng-option>
              <ng-option value="00:59">00:00</ng-option>
              <ng-option value="01:00">01:00</ng-option>
              <ng-option value="02:00">02:00</ng-option>
              <ng-option value="03:00">03:00</ng-option>
              <ng-option value="04:00">04:00</ng-option>
              <ng-option value="05:00">05:00</ng-option>
              <ng-option value="06:00">06:00</ng-option>
           </ng-select>
     </div>

ng-select. Use this option:

[editableSearchTerm]="true"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM