PUGX / PUGXAutoCompleterBundle

Add an autocomplete field to your Symfony forms
GNU Lesser General Public License v3.0
93 stars 38 forks source link

setting options when using jquery-ui #60

Closed maathieu closed 4 years ago

maathieu commented 4 years ago

Hi (again)!

The section "3.1 Select2 options" says how to add options to the autocompleter widget.

Some options also work using jquery-ui, the syntax is a little different however:

var options = { url_list: $('#url-list').attr('href'), url_get: $('#url-get').attr('href'),

// for select2
// otherOptions: { 
//    minimumInputLength: 3,
// }

// for jquery-ui
min_length: 3

}; $('#book_author').autocompleter(options);

Is it possible to either normalize the code so that setting options becomes independent from the library used, or document the way to set options for both libraries?

Many thanks in advance,

garak commented 4 years ago

It's already documented for both libraries, it isn't?

maathieu commented 4 years ago

The section 3.1 of the documentation only covers Select2 and jQuery-UI is not developed.