fg
This commit is contained in:
parent
aa81215c50
commit
c9616415a4
|
|
@ -48124,27 +48124,33 @@ function filtreTableReference(numeroTable) {
|
|||
$("#div_lister_table").html("");
|
||||
$('#div_maj_table').html("");
|
||||
|
||||
// Détruire l'instance existante pour éviter les fuites de mémoire et conflits
|
||||
if ($("#listetables").length) {
|
||||
$("#listetables").selectpicker('destroy');
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: racineWeb + "Ajaxfiltretablesreference/",
|
||||
type : 'post',
|
||||
data: { numeroTable: numeroTable },
|
||||
success: function(data) {
|
||||
// 1. On injecte le contenu
|
||||
// 1. On injecte le contenu (qui contient le nouveau <select id="listetables">)
|
||||
$divListe.html(data);
|
||||
|
||||
// 2. On initialise le selectpicker
|
||||
// 2. Initialisation propre
|
||||
const $select = $("#listetables");
|
||||
$select.selectpicker({
|
||||
liveSearch: true,
|
||||
size: 10,
|
||||
// Force le menu à être attaché au body pour éviter les problèmes de z-index/overflow
|
||||
container: 'body'
|
||||
container: 'body',
|
||||
noneSelectedText: 'Sélectionnez une table...' // Optionnel : texte si vide
|
||||
});
|
||||
|
||||
// 3. FORCE LE FOCUS sur le bouton du selectpicker (l'élément visible)
|
||||
// 3. Focus UX Neutral Pro
|
||||
setTimeout(function() {
|
||||
$divListe.find('.bootstrap-select button').focus().addClass('focus-ring');
|
||||
}, 100);
|
||||
// On cible le bouton généré par Bootstrap-select
|
||||
$divListe.find('.bootstrap-select .dropdown-toggle').focus();
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user