fix(listbox): remove usage of public class fields

This commit is contained in:
Thomas Allmer 2020-09-11 09:36:13 +02:00 committed by Thomas Allmer
parent 8ad5cc56f1
commit 27bc805885
3 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'@lion/listbox': patch
---
Remove usage of public class fields

View file

@ -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.

View file

@ -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;
}
};
}
}