Skip to content

Commit

Permalink
Enable searchable attribute for subtype checklist and add prevent foc…
Browse files Browse the repository at this point in the history
…us on the multiselect input
  • Loading branch information
perfectly-preserved-pie committed Nov 19, 2024
1 parent 1941cfe commit 77d8e69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions assets/javascript/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
document.addEventListener('DOMContentLoaded', function() {
const multiSelectInput = document.querySelector('.mantine-MultiSelect-input');
if (multiSelectInput) {
multiSelectInput.addEventListener('focus', function(event) {
event.preventDefault();
event.stopPropagation();
});
}
});
2 changes: 1 addition & 1 deletion pages/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit 77d8e69

Please sign in to comment.