added "No Options" text on select dropdowns
Some checks failed
Build and Push Docker Image / build (push) Failing after 6m56s
Some checks failed
Build and Push Docker Image / build (push) Failing after 6m56s
This commit is contained in:
parent
cefa56f095
commit
c7b62719a3
@ -264,6 +264,13 @@ $(document).ready(function() {
|
|||||||
$dropdown.append($option)
|
$dropdown.append($option)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// For no options, display a message
|
||||||
|
if (!$select.find("option").length) {
|
||||||
|
const $noOptions = $('<div class="corbz-select-text">');
|
||||||
|
$noOptions.text("No options available");
|
||||||
|
$dropdown.append($noOptions);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize display, and detect future changes
|
// Initialize display, and detect future changes
|
||||||
updateSelectedDisplayWrapper();
|
updateSelectedDisplayWrapper();
|
||||||
$select.on("change", updateSelectedDisplayWrapper);
|
$select.on("change", updateSelectedDisplayWrapper);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user