jQuery UI Widgets Forums Angular http get api integration with jqxInput in angular

Tagged: 

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

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

  • rkumari
    Participant

    Hi I a trying to get data from a service and then I am trying to integrate it with jqxInput in angular. Even though I am able to get data from service, data binding is not working correctly. In dropdown I am not able to get data until and unless I change the cursor position.
    Please let me know if you have any suggestion using jqxInput.

    
    source = {
        datatype: 'json',
        datafields: [{
          name: 'label',
          type: 'label'
        },
        {
          name: 'value',
          type: 'value'
        }],
        localdata: [],
        data: {
          maxRows:10
        }
      }
    
      oninput(event){
        this.dataAdaptor = new jqx.dataAdapter(this.source);
        this.contactService.search(event.args.item.value).subscribe( res => {
    
          // Some code to checking normal conditions then finding value
          //After checking conditions running below code
          let data = res.resObj.map((item) => {
            return {
              label: item.userName,
              value: item.ContactNumber
            };
          });
          this.source.localdata = data;
    
          // I am able to get correct response format till here
          this.dataAdaptor = new jqx.dataAdapter(this.source,{
        autoBind: true});
    
          // here when I am trying to open dropdown/suggesion, it shows null
          this.myInput.opened(true);
          // it shows values only on change on cursor position.
    
        });
      }
    

    admin
    Keymaster

    Hi rkumari,

    Can you share a stackblitz sample which we can test and debug?

    Thanks

    Regards,
    Peter

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

You must be logged in to reply to this topic.