parent
2327ac0729
commit
ba9d0c7477
@ -49,7 +49,22 @@
|
|||||||
</article>
|
</article>
|
||||||
<script>
|
<script>
|
||||||
const element = document.querySelector('#id_place');
|
const element = document.querySelector('#id_place');
|
||||||
const choices = new Choices(element, {searchResultLimit: 10});
|
const choices = new Choices(element, {
|
||||||
|
searchResultLimit: 10,
|
||||||
|
searchEnabled: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
choices.showDropdown();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
const searchTerm = '{{ object.location }}';
|
||||||
|
choices.input.focus();
|
||||||
|
choices.input.value = searchTerm; // Met à jour le champ de recherche visible
|
||||||
|
choices._handleSearch(searchTerm); // Force la recherche
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.querySelector(".choices__inner").classList.add("contrast");
|
document.querySelector(".choices__inner").classList.add("contrast");
|
||||||
document.querySelector(".choices__inner").classList.add("outline");
|
document.querySelector(".choices__inner").classList.add("outline");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user