sergiodlopes / jquery-flexdatalist

Flexible input autocomplete/datalist plugin for jQuery
http://projects.sergiodinislopes.pt/flexdatalist/
MIT License
364 stars 84 forks source link

Popuplation of initial Values changes - no option to keep old behaviour #160

Open Dattel opened 6 years ago

Dattel commented 6 years ago

Hi.. i'm using the control with the URL-Property for aquiring the data on input. Formerly i initialized the jquery-flexlist with putting a preformated JSON-String to the "Value"-Property. Everything was fine so far.

These behaviour seems to have dramatically changed in the last releases. Now every preselected item triggers a search request on that data-url with the "load"-array populated. In my case that is not nesessary, because all data is already at place... it produces a bunch of roundtrips in my setup.

Is there a simple way to keep the old behaviour (e.g. with an option)?

Dattel commented 6 years ago

In addition: i use more complex datastructures (which the rest of the jquery-flexdatalist code also respects: visibleProperties, textproperty, groupBy, ...) Currently the loading technique for initial values assumes that the value is a "," separated list of only ID's. It's not enough to split the value by "," and try to "load" them within a AJAX Request since sometimes another fields are nessessary to identify the object.

My initial JSON-value items consits of an ID representing an objectid and a TYPEID which represents the type of the object because i mix different objects (eg. from different datatables) in one JQueryControl....

Currently the control seems not to be useable in a more complex setup.