I am also having this issue and can't find a way to fix it. setData
doesn't seem to actually update any of the options that were set on
load. This may be just my misunderstanding of how the plugin works,
but on line 625 we see this code:
if ( "data" in arguments[1] )
cache.populate();
In testing this, the execution doesn't ever seem to reach the
cache.populate() code because arguments[1] is *always* (as far as I
can tell, passing in different options) an _empty_ struct no matter
what struct of options is passed in.
Thanks to anyone who could shed some light on this!
On Oct 8, 2:22 pm, mario <[EMAIL PROTECTED]> wrote:
> I also tried to use "flushCache" but I think that works only for
> remote data.
>
> On Oct 8, 3:09 pm,mario<[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm using an input box with an autocompleter with local data, like
> > this:
>
> > >> var persons = [{name : "John"}, {name : "Carl"}, {name : "Susan"}];
> > >> $('#inputname').autocomplete({ data: persons, (...) });
>
> > And was trying to see if i could update the local data by adding
> > another object to persons:
>
> > >> persons[persons.length] = {name: "New Name"};
>
> > But theautocompletedoesn't read the data dynamically and it seams to
> > only read the data on load. I tried with:
>
> > >> $('#inputname').autocomplete("setData", { data: persons, (...) });
>
> > AND by destroying theautocompleteand resetting theautocomplete:
>
> > >> $('#inputname').autocomplete("destroy");
> > >> $('#inputname').autocomplete({ data: persons, (...) });
>
> > but none seemed to work.
>
> > Is there anyway to accomplish this, I prefer to load the data locally
> > to minimize the load on the server...
>
> > Thanks,
> >Mario
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---