Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted() {
// do not delete this reference as it triggers initial chip list instantiation.
this.chips_;
this.foundation = new MDCChipSetFoundation({
focusChipPrimaryActionAtIndex: index => {
const chip = this.chips_[index];
chip && chip.focusPrimaryAction();
},
focusChipTrailingActionAtIndex: index => {
const chip = this.chips_[index];
chip && chip.focusTrailingAction();
},
getChipListCount: () => {
return this.chips_.length;
},
getIndexOfChipById: chipId => {
return this.chips_.findIndex(({ id }) => id == chipId);
},
hasClass: className => this.$el.classList.contains(className),