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

Reset <sm-select> after form submit? #148

Open
snstarosciak opened this issue Dec 20, 2016 · 2 comments
Open

Reset <sm-select> after form submit? #148

snstarosciak opened this issue Dec 20, 2016 · 2 comments

Comments

@snstarosciak
Copy link

Hey there, is there a way to reset the <sm-select>back to its initial state of no value selected? I have a form that, once submitted, maintains the state of the select dropdowns, even though I create a brand new form, which should clear the values selected in each dropdown.

@sushanzh
Copy link

I am facing the same challenge. Did you find a way to do it please?

@gameot
Copy link

gameot commented May 26, 2017

I did this by @ViewChild and the semantic-ui clear parameter.
Some code:

...
@ViewChild("selectE") selectE: SemanticSelectComponent;

resetSelect(){
    jQuery(this.selectE.select.nativeElement).dropdown('clear');
}

But have small issue, see #182

yzhang921 added a commit to yzhang921/ngSemantic that referenced this issue Dec 7, 2017
Reset <sm-select> after form submit? vladotesanovic#148  
clear content when the model change to null or undefined
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