Skip to content

Commit

Permalink
refactor(dropdown): remove obsolete logic (#8321)
Browse files Browse the repository at this point in the history
**Related Issue:** N/A

## Summary

Cleans up some code that relies on a custom `dropdown-item` attribute
(`islink`) that was removed in
https://github.com/Esri/calcite-design-system/pull/2106/files#diff-a41ea470fa36ce6cabf5f622a56904c6bbd308964030313c2962a0afe6c19517L172.
  • Loading branch information
jcfranco authored and alisonailea committed Dec 7, 2023
1 parent f704a89 commit ea45dbd
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -655,16 +655,12 @@ export class Dropdown
);
};

private getFocusableElement(item): void {
private getFocusableElement(item: HTMLCalciteDropdownItemElement): void {
if (!item) {
return;
}

const target = item.attributes.isLink
? item.shadowRoot.querySelector("a")
: (item as HTMLCalciteDropdownItemElement);

focusElement(target);
focusElement(item);
}

private toggleOpenEnd = (): void => {
Expand Down

0 comments on commit ea45dbd

Please sign in to comment.