jQuery UI Widgets Forums Angular jqxInput Autocomplete in Angular

This topic contains 1 reply, has 2 voices, and was last updated by  Yavor Dashev 3 months, 4 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxInput Autocomplete in Angular #120268

    npiccone
    Participant

    Hi all,
    i’m trying to get a jqxInput with autocomplete work, but i’m experiencing some problem (i’m new in Angular development world).

    This is the code in my componente html

    <jqxInput #jqxInputDiba
                                  [theme]="'material'"
                                  [source]= "dataAdapterForDiba" 
                                  [displayMember]= "'BOMItemCode'"
                                  [valueMember]= "'BOMItemCode'"
                                  [placeHolder] = '"Codice Diba"'                                                
                                  [width]= "'75%'" 
                                  [height]= "50"
                                  [popupZIndex]="99999"
                                  (onSelect)= "onselectDiba($event)"
                              >
                              </jqxInput>                  

    And this is my typescript code to handle the onSelect Event

    onselectDiba(event: any): void {
    
          if (event.args) {
              let item = event.args.item;
              if (item) {
                this.CreateDibaItem = false;
                this.DibaNameControl.disable();         
              }
          }
          else {
              this.CreateDibaItem = true;
              this.DibaNameControl.enable();
          }
      }

    The problem is that i don’t really understand when the onSelect event fires and when it fires event.args is always undefined.
    I need to check if the input value is one of the value in the datasource bind to the jqxInput or not. What’s wrong in this code?

    Thanks in advance.

    • This topic was modified 3 months, 4 weeks ago by  npiccone.
    jqxInput Autocomplete in Angular #120270

    Yavor Dashev
    Participant

    Hi npiccone,

    The onSelect event fires when an item is selected from the pop-up menu of the jqxInput.
    However I tested the code that you have shared with us and all works fine as it should be.

    If it is possible for you to share a bit more context or a code example of your case(which reproduces the error that you encounter) this will be best.

    Please, do not hesitate to contact us if you have any additional questions.

    Best Regards,
    Yavor Dashev
    jQWidgets team
    https://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.