feat: more changes and fixes

This commit is contained in:
Herculino Trotta
2025-11-09 15:31:50 -03:00
parent 2afb6b1f5f
commit 7e37948616
41 changed files with 480 additions and 432 deletions

View File

@@ -23,10 +23,11 @@ window.TomSelect = function createDynamicTomSelect(element) {
},
},
onInitialize: function () {
onDropdownOpen: function () {
// Move dropdown to body to escape stacking context issues
document.body.appendChild(this.dropdown);
this.popper = Popper.createPopper(this.control, this.dropdown, {
placement: "bottom-start",
strategy: "fixed",
@@ -58,11 +59,9 @@ window.TomSelect = function createDynamicTomSelect(element) {
});
},
onDropdownOpen: function () {
this.popper.update();
},
onDropdownClose: function () {
// Optional: move back to wrapper to keep DOM clean, but not necessary
this.popper.destroy();
this.dropdown.remove();
}
};