Skip to content

How to clear selection ? #168

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

Closed
spatsatzis opened this issue Dec 5, 2014 · 3 comments
Closed

How to clear selection ? #168

spatsatzis opened this issue Dec 5, 2014 · 3 comments

Comments

@spatsatzis
Copy link

Hello , is there a way to manually clear the element ? I want to simulate the X button press event. Is there a way ? thanks !

@amkoehler
Copy link

I had some luck with @mikeblum's solution found here. (I think he has a more complete solution somewhere else). If you don't want to mess with the source code, you could also call both clearTarget and clearElement. That seemed to also do the trick for me.

$('#element').data('combobox').clearTarget();
$('#element').data('combobox').clearElement();

@muzzoman
Copy link

Thanks a lot akman003!
I found your solution after many attempts to do this job. Pretty simple but not so trivial to find out.

@spatsatzis
Copy link
Author

Thanks @akman003 , i will try yo play with this solution.

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