We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7fa944 commit 9fd36aaCopy full SHA for 9fd36aa
elements/pf-accordion/BaseAccordion.ts
@@ -97,7 +97,7 @@ export abstract class BaseAccordion extends LitElement {
97
get #activeHeader() {
98
const { headers } = this;
99
const index = headers.findIndex(header => header.matches(':focus,:focus-within'));
100
- return headers.at(index);
+ return index > -1 ? headers.at(index) : undefined;
101
}
102
103
protected expandedSets = new Set<number>();
@@ -162,7 +162,7 @@ export abstract class BaseAccordion extends LitElement {
162
this.updateAccessibility();
163
164
165
- #updateActiveHeader() {
+ #updateActiveHeader(event: FocusEvent) {
166
if (this.#activeHeader) {
167
this.#headerIndex.updateActiveItem(this.#activeHeader);
168
0 commit comments