Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
setAttributeAtRowIndex: (rowIndex, attr, value) => {
this.getRows()[rowIndex].setAttribute(attr, value);
},
setHeaderRowCheckboxChecked: checked => {
this.headerRowCheckbox_.checked = checked;
},
setHeaderRowCheckboxIndeterminate: indeterminate => {
this.headerRowCheckbox_.indeterminate = indeterminate;
},
setRowCheckboxCheckedAtIndex: (rowIndex, checked) => {
this.rowCheckboxList_[rowIndex].checked = checked;
},
};
this.foundation = new MDCDataTableFoundation(adapter);
this.foundation.init();
this.headerRow_ = this.$el.querySelector(`.${cssClasses.HEADER_ROW}`);
this.handleHeaderRowCheckboxChange_ = () =>
this.foundation.handleHeaderRowCheckboxChange();
this.headerRow_.addEventListener(
'change',
this.handleHeaderRowCheckboxChange_,
);
this.content_ = this.$el.querySelector(`.${cssClasses.CONTENT}`);
this.handleRowCheckboxChange_ = event =>
this.foundation.handleRowCheckboxChange(event);
this.content_.addEventListener('change', this.handleRowCheckboxChange_);
this.layout();