Skip to content

Commit

Permalink
add destroy function, add pointer cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed Dec 13, 2024
1 parent 15a5e75 commit d94bb82
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions js/src/bootstrap5/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ export class AutocompleteWidget extends BaseAutocomplete {
});
}

destroy() {
this.unload();
this.dd_elem.remove();
}

/**
* Handles input events, resets suggestions, and triggers autocomplete.
*
Expand Down
1 change: 1 addition & 0 deletions scss/bootstrap5/widget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ div.autocomplete-dropdown {
.autocomplete-suggestion {
padding-top: 7px;
padding-bottom: 7px;
cursor: pointer;
}

.autocomplete-suggestion.selected {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ var yafowil_autocomplete = (function (exports, $) {
this.dd_elem.show();
});
}
destroy() {
this.unload();
this.dd_elem.remove();
}
on_input(e) {
clearTimeout(this.timeout);
this.ul_elem.empty();
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d94bb82

Please sign in to comment.