getmdl-select icon indicating copy to clipboard operation
getmdl-select copied to clipboard

Clear selected item by code

Open gregoryscode opened this issue 5 years ago • 2 comments

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

Thank you.

gregoryscode avatar Jun 27 '20 22:06 gregoryscode

Hello! This solution worked for me:

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

dolhaid avatar Jul 04 '20 14:07 dolhaid

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

Developer66 avatar Jun 23 '21 18:06 Developer66