Completion starts only when we have 3 characters

And this time it works
This commit is contained in:
Martin Pépin 2017-01-06 17:26:35 +01:00
parent c355c71fe5
commit 0d09bf62af
2 changed files with 3 additions and 3 deletions

View file

@ -6,5 +6,5 @@ from django.contrib.auth.models import User
autocomplete_light.register(
User, search_fields=('username', 'first_name', 'last_name'),
autocomplete_js_attributes={'placeholder': 'membre...'},
widget_attrs={'data-widget-minimum-values': 3})
attrs={'placeholder': 'membre...'}
)

View file

@ -18,7 +18,7 @@
$(document).ready(function() {
$('input#search_autocomplete').yourlabsAutocomplete({
url: '{% url 'gestioncof.autocomplete.autocomplete' %}',
minimumCharacters: 1,
minimumCharacters: 3,
id: 'search_autocomplete',
choiceSelector: 'li:has(a)',
placeholder: "Chercher un utilisateur par nom, prénom ou identifiant clipper",