How to use the @material/list.strings.CHECKBOX_RADIO_SELECTOR function in @material/list

To help you get started, we’ve selected a few @material/list examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trimox / angular-mdc-web / packages / list / list.ts View on Github external
_handleClickEvent(evt: MouseEvent): void {
    const index = this._getListItemIndexByEvent(evt);
    const target = as HTMLElement;

    const listItem = this._getListItemByEventTarget(!);
    if (listItem && listItem.disabled) {

    // Toggle the checkbox only if it's not the target of the event, or the checkbox will have 2 change events.
    const toggleCheckbox = !matches(target, strings.CHECKBOX_RADIO_SELECTOR);
    this._foundation.handleClick(index, toggleCheckbox);