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

cleaning selection #4

Open
gaydenko opened this issue Apr 4, 2014 · 1 comment
Open

cleaning selection #4

gaydenko opened this issue Apr 4, 2014 · 1 comment

Comments

@gaydenko
Copy link

gaydenko commented Apr 4, 2014

Ryan, thanks for the plugin.

Have not found a way how to deal with a situation when client has selected an item from the list, but then cleaned input field. At this point submitting a form results in as the object was selected before field cleaning is still selected.

How to deal with such use case?

@gaydenko gaydenko changed the title clearing selection cleaning selection Apr 4, 2014
@gaydenko
Copy link
Author

gaydenko commented Apr 5, 2014

At the moment I have appended init() with

            if (typeof options.elementHook === "function") 
                options.elementHook.call(context.$data, element);

It permits to add listeners to element in needed way, keeping all code in one place. I'm not sure context is really needed, probably null would be sufficient.

What do you think?

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

1 participant