fix setFocus() method on button

pull/385/head
Cory LaViska 2021-03-15 13:03:01 -04:00
rodzic 57b561b353
commit a67db7e13e
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -12,6 +12,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
- Fixed `aria-label` and `aria-labelledby` props in `sl-dialog` and `sl-drawer`
- Fixed `tabindex` prop in `sl-menu`
- Fixed a bug in `sl-select` where tags would always render as pills
- Fixed a bug in `sl-button` where calling `setFocus()` would throw an error
## 2.0.0-beta.32

Wyświetl plik

@ -1,4 +1,4 @@
import { LitElement, html, internalProperty, property, unsafeCSS } from 'lit-element';
import { LitElement, html, internalProperty, property, query, unsafeCSS } from 'lit-element';
import { classMap } from 'lit-html/directives/class-map';
import { ifDefined } from 'lit-html/directives/if-defined';
import { event, EventEmitter, tag } from '../../internal/decorators';
@ -26,7 +26,7 @@ import { hasSlot } from '../../internal/slot';
export default class SlButton extends LitElement {
static styles = unsafeCSS(styles);
button: HTMLButtonElement | HTMLLinkElement;
@query('.button') button: HTMLButtonElement | HTMLLinkElement;
@internalProperty() private hasFocus = false;
@internalProperty() private hasLabel = false;