diff --git a/assets/javascript/custom.js b/assets/javascript/custom.js new file mode 100644 index 00000000..bf20bab2 --- /dev/null +++ b/assets/javascript/custom.js @@ -0,0 +1,11 @@ +document.addEventListener('DOMContentLoaded', function() { + const multiSelectDropdown = document.querySelector('.mantine-MultiSelect-dropdown'); + if (multiSelectDropdown) { + multiSelectDropdown.addEventListener('mousedown', function(event) { + // Prevent default focus behavior + event.preventDefault(); + // Set focus to another element (e.g., body) + document.body.focus(); + }); + } +}); \ No newline at end of file diff --git a/pages/components.py b/pages/components.py index 66575c7e..0a684d8a 100644 --- a/pages/components.py +++ b/pages/components.py @@ -234,7 +234,7 @@ def create_subtype_checklist(self): id='subtype_checklist', data=data, value=initial_values, - searchable=False, + searchable=True, nothingFoundMessage="No options found", clearable=True, style={"margin-bottom": "10px"},