Skip to content

Commit

Permalink
chore(accordion): removing ununsed code
Browse files Browse the repository at this point in the history
  • Loading branch information
venkateshjo committed Jun 22, 2023
1 parent 0113417 commit 45e75c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 11 additions & 0 deletions packages/accordion/src/Accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ governing permissions and limitations under the License.
import {
CSSResultArray,
html,
PropertyValues,
SizedMixin,
SpectrumElement,
TemplateResult,
Expand Down Expand Up @@ -98,6 +99,16 @@ export class Accordion extends SizedMixin(SpectrumElement) {
});
}

protected override updated(changed: PropertyValues<this>): void {
super.updated(changed);
if (changed.has('size')) {
const assignedElements = [...this.items] as AccordionItem[];
assignedElements.forEach((item) => {
item.size = this.size;
});
}
}

protected override render(): TemplateResult {
return html`
<slot
Expand Down
7 changes: 0 additions & 7 deletions packages/accordion/src/AccordionItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ export class AccordionItem extends SizedMixin(Focusable) {

protected override updated(changes: PropertyValues): void {
super.updated(changes);
this.dispatchEvent(
new CustomEvent('sp-accordion-item-added', {
bubbles: true,
composed: true,
cancelable: true,
})
);
if (changes.has('disabled')) {
if (this.disabled) {
this.setAttribute('aria-disabled', 'true');
Expand Down

0 comments on commit 45e75c5

Please sign in to comment.