Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
notifyAction: index => {
emitCustomEvent(
this.$el,
ACTION_EVENT,
{ index },
/** shouldBubble */ true,
);
this.$emit('action', { index });
},
isFocusInsideList: () => {
return this.$el.contains(document.activeElement);
},
};
this.foundation = new MDCListFoundation(adapter);
this.foundation.init();
this.foundation.layout();
this.initializeListType();
this.foundation.setSingleSelection(this.singleSelection);
if (
this.singleSelection &&
typeof this.selectedIndex === 'number' &&
!isNaN(this.selectedIndex)
) {
this.foundation.setSelectedIndex(this.selectedIndex);
}
this.foundation.setWrapFocus(wrapFocus);
notifyAction: index => {
emitCustomEvent(
this.$el,
ACTION_EVENT,
{ index },
/** shouldBubble */ true,
);
this.$emit('action', { index });
},
isFocusInsideList: () => {
return this.$el.contains(document.activeElement);
},
isRootFocused: () => document.activeElement === this.$el,
};
this.foundation = new MDCListFoundation(adapter);
this.foundation.init();
this.foundation.layout();
this.initializeListType();
this.foundation.setSingleSelection(this.singleSelection);
if (
this.singleSelection &&
typeof this.selectedIndex === 'number' &&
!isNaN(this.selectedIndex)
) {
this.foundation.setSelectedIndex(this.selectedIndex);
}
this.foundation.setWrapFocus(wrapFocus);