Skip to content

Commit

Permalink
add method setDisabled to SelectInput
Browse files Browse the repository at this point in the history
  • Loading branch information
SweetDealer committed Mar 29, 2024
1 parent 3e782a2 commit 82540cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elsci-io/ui-essential",
"version": "1.0.54",
"version": "1.0.55",
"description": "Material Design components created for products built by elsci.io",
"main": "src/index.js",
"type": "module",
Expand Down
6 changes: 6 additions & 0 deletions src/SelectInput/SelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export default class SelectInput extends HTMLElement {
this.#dropdownElement.comparator = comparator;
}

/** @param {boolean} isDisabled */
setDisabled(isDisabled) {
this.toggleAttribute("disabled", isDisabled);
this.#inputElement.setDisabled(isDisabled);
}

showDropdown() {
this.#dropdownElement.show();
this.#callbacks.onShowDropdown.forEach(callback => callback());
Expand Down

0 comments on commit 82540cf

Please sign in to comment.