Skip to content

Commit

Permalink
fix: remove attribute binding logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nickschaap authored and Westbrook committed Mar 22, 2023
1 parent 570a2cd commit 7bce0ae
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions packages/tabs/src/TabsOverflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
TemplateResult,
} from '@spectrum-web-components/base';
import {
property,
query,
queryAssignedElements,
state,
Expand All @@ -31,7 +30,6 @@ import '@spectrum-web-components/icons-ui/icons/sp-icon-chevron100.js';
import chevronIconStyles from '@spectrum-web-components/icon/src/spectrum-icon-chevron.css.js';

import styles from './tabs-overflow.css.js';
import { MutationController } from '@lit-labs/observers/mutation_controller.js';

interface TabsOverflowState {
canScrollLeft: boolean;
Expand All @@ -45,9 +43,6 @@ export class TabsOverflow extends SizedMixin(SpectrumElement) {
return [styles, chevronIconStyles];
}

@property({ type: Boolean, reflect: true })
compact = false;

@state()
private overflowState: TabsOverflowState = {
canScrollLeft: false,
Expand All @@ -62,17 +57,6 @@ export class TabsOverflow extends SizedMixin(SpectrumElement) {

resizeController!: ResizeController;

tabsMutations = new MutationController(this, {
target: null,
config: {
attributes: true,
attributeFilter: ['size', 'compact'],
},
callback: () => {
this.manageTabsAttributes();
},
});

public constructor() {
super();
this.resizeController = new ResizeController(this, {
Expand All @@ -83,13 +67,6 @@ export class TabsOverflow extends SizedMixin(SpectrumElement) {
});
}

private manageTabsAttributes(): void {
const [tabsElement] = this.scrollContent;
this.size = tabsElement.size;
this.compact = tabsElement.compact;
this.compact;
}

protected override firstUpdated(changes: PropertyValues): void {
super.firstUpdated(changes);
// enable scroll event
Expand All @@ -99,7 +76,6 @@ export class TabsOverflow extends SizedMixin(SpectrumElement) {

private async _handleSlotChange(): Promise<void> {
const [tabsElement] = this.scrollContent;
this.manageTabsAttributes();
await tabsElement?.updateComplete;
this._updateScrollState();
}
Expand Down

0 comments on commit 7bce0ae

Please # to comment.