fix(listbox): remove usage of public class fields
This commit is contained in:
parent
8ad5cc56f1
commit
27bc805885
3 changed files with 24 additions and 2 deletions
5
.changeset/perfect-birds-relate.md
Normal file
5
.changeset/perfect-birds-relate.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@lion/listbox': patch
|
||||
---
|
||||
|
||||
Remove usage of public class fields
|
||||
|
|
@ -31,6 +31,22 @@ export const main = () => html`
|
|||
`;
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Single & Multiple Choice
|
||||
- Orientation
|
||||
- Rotation when using keyboard for selection
|
||||
|
||||
## How to use
|
||||
|
||||
### Installation
|
||||
|
||||
```bash
|
||||
npm i --save @lion/listbox
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
## Multiple choice
|
||||
|
||||
Add `multiple-choice` flag to allow multiple values to be selected.
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ export class LionOption extends DisabledMixin(ChoiceInputMixin(FormRegisteringMi
|
|||
constructor() {
|
||||
super();
|
||||
this.active = false;
|
||||
this.__onClick = this.__onClick.bind(this);
|
||||
this.__registerEventListeners();
|
||||
}
|
||||
|
||||
|
|
@ -117,7 +118,7 @@ export class LionOption extends DisabledMixin(ChoiceInputMixin(FormRegisteringMi
|
|||
this.removeEventListener('click', this.__onClick);
|
||||
}
|
||||
|
||||
__onClick = () => {
|
||||
__onClick() {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -127,5 +128,5 @@ export class LionOption extends DisabledMixin(ChoiceInputMixin(FormRegisteringMi
|
|||
} else {
|
||||
this.checked = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue