1

I can't get a basic select control working with MDC. Does anyone know what I'm doing wrong? (other mdc-components works just fine with on same setup)

UI-bug (PNG)

Javascript:

import {MDCSelect} from '@material/select';
var selTEST = new MDCSelect(document.getElementById('selTEST'));

CSS:

@import "@material/select/mdc-select";

HTML:

<div class="mdc-select" id="selTEST">
    <select class="mdc-select__native-control">
    <option value="" disabled selected></option>
    <option value="grains">Bread, Cereal, Rice, and Pasta</option>
    <option value="vegetables">Vegetables</option>
    <option value="fruit">Fruit</option>
</select>
<label class="mdc-floating-label">Pick a Food Group</label>
<div class="mdc-line-ripple"></div>

4

0 回答 0