EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: btgoa on September 07, 2017, 12:59:05 AM



Title: tagbox with a dynamic list data
Post by: btgoa on September 07, 2017, 12:59:05 AM
Hi,

When using combobox, if the "mode" is set to "remote", then each time I change the value in inputbox, the list will be reloaded from remote url.

I wonder if this method can be applied to tagbox?

Thanks in advance.

Regards,


Title: Re: tagbox with a dynamic list data
Post by: stworthy on September 08, 2017, 05:44:28 AM
The tagbox component extends from combobox, it has all the features defined in combobox. You can set the 'mode' property to 'remote' to get this feature.


Title: Re: tagbox with a dynamic list data
Post by: btgoa on September 11, 2017, 07:18:12 AM
The tagbox component extends from combobox, it has all the features defined in combobox. You can set the 'mode' property to 'remote' to get this feature.

Hi stworthy, I've tried to set the 'mode' property of tagbox to 'remote' but the feature seems not working. However, it is working in combobox.


Title: Re: tagbox with a dynamic list data
Post by: btgoa on September 12, 2017, 05:41:43 PM
The tagbox component extends from combobox, it has all the features defined in combobox. You can set the 'mode' property to 'remote' to get this feature.

Hi stworthy, it seems that if the limitToList is set to true, the dropdown list will appear when typing. Otherwise the dropdown list will not appear and there's no ajax request fired when typing.


Title: Re: tagbox with a dynamic list data
Post by: jega on March 16, 2018, 03:28:34 AM
This still not working.

       <input id="unitSearch" name="unitSearch" class="easyui-tagbox" style="width:300px" data-options="
          loader: unitsLoader,
          mode: 'remote',
          valueField: 'id',
          textField: 'name',
          formatter: formatUnit,
          hasDownArrow: true,
          label:'Add unitID',
          labelPosition:'top'">

No request to server.

Works fine in combobox


Title: Re: tagbox with a dynamic list data
Post by: stworthy on March 16, 2018, 08:32:26 AM
You should set 'limitToList' property to true.


Title: Re: tagbox with a dynamic list data
Post by: jega on June 13, 2018, 12:03:18 AM
Can't get this to work. maybe the tagbox can't be used to this.


       <input id="personSearch" name="personSearch" class="easyui-tagbox" style="width:300px" data-options="
          loader: personLoader,
          mode: 'remote',
          valueField: 'id',
          textField: 'name',
          limitToList:true,
          hasDownArrow: true,
          label:'Add person',
          labelPosition:'top'">

Let's say all persons names in database is Name1, Name2, Name3.........

Typing name will return all records from db. Typing name1 returns only 1 record, just like expected.
Choosing this record, will make a tag with Name1. So far so good.

Typing name, shows all records. Typing name2, it finds name2, but destroys the first tag with name1. Because this is not in list anymore.

So tagbox and remote works not together. If loading the entire records in tagbox, it works fine, but i have maybe 14000 records.

Jesper