How to use the @material/slider.MDCSlider function in @material/slider

To help you get started, we’ve selected a few @material/slider 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 prateekbh / preact-material-components / ts / Slider / index.tsx View on Github external
public componentDidMount() {
    super.componentDidMount();
    if (this.control) {
      this.MDComponent = new MDCSlider(this.control);
      this.MDComponent.listen('MDCSlider:change', this.onChange);
      this.MDComponent.listen('MDCSlider:input', this.onInput);
    }
    this.setValue(this.props.value); // set initial value programatically because of error if min is greater than initial max
  }
github Tencent / omi / packages / templates-old / omisu / src / slider / index.tsx View on Github external
installed() {
    const slider = new MDCSlider(_.base)
    slider.listen('MDCSlider:change', () => {
      _.props.onChange && _.props.onChange(slider.value) 
    })
  }
})
github Tencent / omi / packages / omim / src / slider / index.tsx View on Github external
installed() {

    const slider = new MDCSlider(this.shadowRoot.querySelector('.mdc-slider'));
    slider.listen('MDCSlider:change', () => {
      this.fire('change', { value: slider.value })
    });
  }