Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(select): Fix JS example to actually work #2332

Merged
merged 4 commits into from
Mar 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/mdc-select/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ npm install --save @material/select
Then with JS

```js
import {MDCSelect} from '@material/select';

const select = new MDCSelect(document.querySelector('.mdc-select'));
const select = new mdc.select.MDCSelect(document.querySelector('.mdc-select'));
select.listen('MDCSelect:change', () => {
alert(`Selected "${select.selectedOptions[0].textContent}" at index ${select.selectedIndex} ` +
`with value "${select.value}"`);
});
```

See [Importing the JS component](../../docs/importing-js.md) for more information on how to import JavaScript.

Note that you can include mdc-select via a UMD bundle, which will be available post-alpha.

> Note that the full-fidelity version of MDC Select requires you to manually include the styles for
Expand Down