apply suggested changes

This commit is contained in:
Shmuel Leider
2024-08-01 14:20:48 -04:00
parent e23553ee2f
commit 007b022f3b
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,8 @@
import '../../internal/scrollend-polyfill.js';
import { classMap } from 'lit/directives/class-map.js';
import { eventOptions, property, query, state } from 'lit/decorators.js';
import { html } from 'lit';
import { LocalizeController } from '../../utilities/localize.js';
import { property, query, state } from 'lit/decorators.js';
import { scrollIntoView } from '../../internal/scroll.js';
import { watch } from '../../internal/watch.js';
import componentStyles from '../../styles/component.styles.js';
@@ -61,7 +62,6 @@ export default class SlTabGroup extends ShoelaceElement {
@state() private hasScrollControls = false;
@state() private shouldHideScrollStartButton = false;
@state() private shouldHideScrollEndButton = false;
/** The placement of the tabs. */
@@ -378,6 +378,7 @@ export default class SlTabGroup extends ShoelaceElement {
*/
private scrollOffset = 1;
@eventOptions({ passive: true })
private updateScrollButtons() {
if (this.hasScrollControls && this.autoHideScrollButtons) {
this.shouldHideScrollStartButton = this.scrollFromStart() <= this.scrollOffset;

View File

@@ -33,8 +33,7 @@ export default css`
.tab-group--has-scroll-controls .tab-group__scroll-button--start--hidden,
.tab-group--has-scroll-controls .tab-group__scroll-button--end--hidden {
opacity: 0;
pointer-events: none;
visibility: hidden;
}
.tab-group__body {