fix: ensure deselecting presence modifier re-enables string input

This commit is contained in:
2026-06-10 19:14:33 +02:00
parent 64392c3935
commit 30d35a2368
2 changed files with 34 additions and 1 deletions
+17 -1
View File
@@ -316,7 +316,11 @@
if (!container) return;
var textInput = container.querySelector('input[type="text"]');
if (!textInput) return;
var val = radio.value;
// Find the currently checked radio in the container
var checkedRadio = container.querySelector('input[type="radio"]:checked');
var val = checkedRadio ? checkedRadio.value : "";
if (val === "IS_NULL" || val === "NOT_NULL") {
textInput.disabled = true;
textInput.value = "";
@@ -455,9 +459,21 @@
});
}
/**
* Set up event listeners for string modifier radio buttons.
*/
function setupStringFilters() {
document.querySelectorAll('input[data-string-modifier-radio]').forEach(function (radio) {
radio.addEventListener('change', function () {
window.toggleStringFilterInput(this);
});
});
}
document.addEventListener("DOMContentLoaded", function () {
injectSearchInputs();
setupDeselectableRadios();
setupStringFilters();
loadPresets();
});
})();