update scroll controls when adding tabs; fixes #1208

pull/1213/head
Cory LaViska 2023-02-23 10:12:36 -05:00
rodzic 5b12de1edf
commit 226c856b1e
2 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -10,6 +10,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
- Fixed a bug in `<sl-select>` that caused the display label to render incorrectly in Chrome after form validation [#1197](https://github.com/shoelace-style/shoelace/discussions/1197)
- Fixed a bug in `<sl-input>` that prevented users from applying their own value for `autocapitalize`, `autocomplete`, and `autocorrect` when using `type="password` [#1205](https://github.com/shoelace-style/shoelace/issues/1205)
- Fixed a bug in `<sl-tab-group>` that prevented scroll controls from showing when dynamically adding tabs [#1208](https://github.com/shoelace-style/shoelace/issues/1208)
When using `<input type="password">` the default value for `autocapitalize`, `autocomplete`, and `autocorrect` may be affected due to the bug fixed in [#1205](https://github.com/shoelace-style/shoelace/issues/1205). For any affected users, setting these attributes to `off` will restore the previous behavior.

Wyświetl plik

@ -316,6 +316,9 @@ export default class SlTabGroup extends ShoelaceElement {
this.tabs = this.getAllTabs({ includeDisabled: false });
this.panels = this.getAllPanels();
this.syncIndicator();
// After updating, show or hide scroll controls as needed
this.updateComplete.then(() => this.updateScrollControls());
}
@watch('noScrollControls', { waitUntilFirstUpdate: true })