Topic: Key-up on autocompleter

stefanvjd premium asked 3 years ago


Hi

Expected behavior

When navigating through the options in an auto complete and pressing 'Enter' on the keyboard, the highlighted value is selected

Actual behavior

Pressing enter on the keyboard does not select the value

I've tried setting keyup on mdb-options and on each option div but the event does not trigger.

<mdb-auto-completer #auto="mdbAutoCompleter" textNoResults="" ><br> <mdb-option (click)="onItemSelected(option)" *ngFor="let option of results" [value]="option.text" (keyup.enter)="onItemSelected(option)"><br> <div class="d-flex flex-column" (keyup.enter)="onItemSelected(option)"><br> {{option.fullText}}<br> </div><br> </mdb-option><br> </mdb-auto-completer>

Please advise


Arkadiusz Idzikowski staff commented 3 years ago

Are there any errors in the console when you try to select an option using 'Enter' key? Please edit your post and add the full HTML/TS code that you use to render the component, so we can reproduce the problem.

I just tested that and it looks like everything is working correctly on our end.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: 9.4.0
  • Device: Web
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No