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

Clear selected item by code #108

Open
gregoryscode opened this issue Jun 27, 2020 · 2 comments
Open

Clear selected item by code #108

gregoryscode opened this issue Jun 27, 2020 · 2 comments

Comments

@gregoryscode
Copy link

Hello, how can I clear selected value and set get-mdl-select to its initial state by javascript?

Thank you.

@dolhaid
Copy link

dolhaid commented Jul 4, 2020

Hello! This solution worked for me:

document.querySelector('#select-text')[0].parentElement.MaterialTextfield.change(''); document.querySelector('#select-value').val(0);

@Developer66
Copy link

Developer66 commented Jun 23, 2021

This worked for me: getmdlSelect.init('.getmdl-select');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants