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

Can I use auto_select2 for CREATING dependent values? #2

Open
maksimf opened this issue Dec 9, 2014 · 4 comments
Open

Can I use auto_select2 for CREATING dependent values? #2

maksimf opened this issue Dec 9, 2014 · 4 comments

Comments

@maksimf
Copy link

maksimf commented Dec 9, 2014

I read about your gem at habrahabr.ru and thank you for your work. In one of the examples you've shown gem usage to build dependent selection (country, city example). What if I want to create city that is not present in given selection? Normally I would add new item using createSearchChoice function, is this feature supported in your gem yet?

@Tab10id
Copy link
Collaborator

Tab10id commented Dec 9, 2014

Not yet=( Will do in the next release

@Loriowar
Copy link
Owner

Loriowar commented Dec 9, 2014

It looks like you want something like tags. In current version of the gem can't do this. Moreover this function is useless for complex model with 'NOT NULL' fields. I saw something like you want here.
For realization of it we need to investigate createSearchChoice function and think about details according to gem structure. For a first look it can be done by some js and additional parameter in helper. But it is not in priority. You can help us with initial variant of this. In this case I do other work and release new version.

@maksimf
Copy link
Author

maksimf commented Dec 9, 2014

I agree that this function is useless with model having 'NOT NULL' fields. What I want is not quite like tags. As you have such cool feature as dependent selections and select2 has possibility to add new values which are not there, so why not add this feature to your gem (new values + dependency, which you already have)? I agree that we should start from static versions of this feature (i.e. tags or just single values, to begin with). I'll fork your repo and try to help in that.

@Loriowar
Copy link
Owner

Loriowar commented Dec 9, 2014

You have a right approach to this feature. It would be great If you will start implement this one. I can help you with this feature in the future.

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