@@ -49,7 +49,22 @@
 | 
			
		||||
  </article>
 | 
			
		||||
  <script>
 | 
			
		||||
    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("outline");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user