In this basic example using jQuery autocomplete:
$("#textboxid").autocomplete(
{
source: testdata,
delay: 100,
minLength: 1
});
where testdata is a local array of data, what is the recommended way to have any changes to the underlying source array, reflect in the autocomplete options?
Currently, if I subsequently add a new item to the testdata array (i.e. after the autocomplete has already been setup on the textbox element), I don't see that new option in the autocomplete list. If I dynamically add a new textbox to the page and set up for autocomplete, it does see the new option. But existing elements do not.