How to use the @material/select.MDCSelectIconFoundation function in @material/select

To help you get started, we’ve selected a few @material/select 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 jamesmfriedman / rmwc / src / select / index.tsx View on Github external
getDefaultFoundation() {
    return new MDCSelectIconFoundation({
      getAttr: (attr: string) =>
        this.root.getProp(attr as any) as string | null,
      setAttr: (attr: string, value: string) =>
        this.root.setProp(attr as any, value),
      removeAttr: (attr: string) => this.root.removeProp(attr as any),
      setContent: (content: string) => {
        this.root.ref && (this.root.ref.textContent = content);
      },
      registerInteractionHandler: (
        evtType: K,
        handler: SpecificEventListener
      ) => this.root.addEventListener(evtType, handler),
      deregisterInteractionHandler: (
        evtType: K,
        handler: SpecificEventListener
      ) => this.root.removeEventListener(evtType, handler),