one is Countries, which is 260 countries long (fixed);
the other one is Cities, which is updated via jquery when the user's state is selected;
The list format is [{value:'', text:''},...], and it's size can reach up to 41k characters, and, as far as I know, data attribute tags can support about 65K characters. So It shouldn't be an issue...
I've tried it in four ways:
By adding it directly to the data-source tag in the php file that loads all the content;
For 2 and 3: $.post("includes/options.php", {value:newValue}).done(function(data){ options = data; });
tpl: '<select data-field="'+name+'">'+options+'</select> (tried the variable options as HTML <options> and as the above described list format)
source: options,
For 4: $.post("includes/options.php", {value:newValue}).done(function(data){ $('span[data-name="CITIES"]').data('source', data); });
Just updating data-source directly: tpl: '<select data-field="'+name+'"></select>
When I limit the list to a very few items, it works.
So, is there a size limit to the list?
How to deal with big and dynamically big lists on editable?
Hello guys!
I'm having trouble with two big selects:
Countries
, which is 260 countries long (fixed);Cities
, which is updated via jquery when the user'sstate
is selected;The list format is
[{value:'', text:''},...]
, and it's size can reach up to 41k characters, and, as far as I know, data attribute tags can support about 65K characters. So It shouldn't be an issue...I've tried it in four ways:
data-source
tag in the php file that loads all the content;For 2 and 3:
$.post("includes/options.php", {value:newValue}).done(function(data){ options = data; });
tpl: '<select data-field="'+name+'">'+options+'</select>
(tried the variableoptions
as HTML<options>
and as the above described list format)source: options,
For 4:
$.post("includes/options.php", {value:newValue}).done(function(data){ $('span[data-name="CITIES"]').data('source', data); });
tpl: '<select data-field="'+name+'"></select>
When I limit the list to a very few items, it works.
So, is there a size limit to the list? How to deal with big and dynamically big lists on editable?
Thanks in advance! Have a great one y'all!