remove dead logic

pull/1460/head
Cory LaViska 2023-07-18 12:49:22 -04:00
rodzic 956271880d
commit c6281859fd
2 zmienionych plików z 0 dodań i 26 usunięć

Wyświetl plik

@ -167,11 +167,6 @@ export default class SlButton extends ShoelaceElement implements ShoelaceFormCon
return '';
}
constructor() {
super();
this.addEventListener('click', this.handleHostClick);
}
firstUpdated() {
if (this.isButton()) {
this.formControlController.updateValidity();
@ -198,14 +193,6 @@ export default class SlButton extends ShoelaceElement implements ShoelaceFormCon
}
}
private handleHostClick = (event: MouseEvent) => {
// Prevent the click event from being emitted when the button is disabled or loading
if (this.disabled || this.loading) {
event.preventDefault();
event.stopImmediatePropagation();
}
};
private handleInvalid(event: Event) {
this.formControlController.setValidity(false);
this.formControlController.emitInvalidEvent(event);

Wyświetl plik

@ -48,11 +48,6 @@ export default class SlMenuItem extends ShoelaceElement {
/** Draws the menu item in a disabled state, preventing selection. */
@property({ type: Boolean, reflect: true }) disabled = false;
constructor() {
super();
this.addEventListener('click', this.handleHostClick);
}
private handleDefaultSlotChange() {
const textLabel = this.getTextLabel();
@ -69,14 +64,6 @@ export default class SlMenuItem extends ShoelaceElement {
}
}
private handleHostClick = (event: MouseEvent) => {
// Prevent the click event from being emitted when the button is disabled or loading
if (this.disabled) {
event.preventDefault();
event.stopImmediatePropagation();
}
};
@watch('checked')
handleCheckedChange() {
// For proper accessibility, users have to use type="checkbox" to use the checked attribute