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

Multiple Selectize Sharing Same Selection #32

Open
lxcodes opened this issue Feb 27, 2015 · 4 comments
Open

Multiple Selectize Sharing Same Selection #32

lxcodes opened this issue Feb 27, 2015 · 4 comments

Comments

@lxcodes
Copy link
Contributor

lxcodes commented Feb 27, 2015

Currently I have three {{ember-selectize}} elements on the page all bound to a single property but from different collections / content. If I selected one option in the first selectize and the another option in the second, should the first be cleared? Currently not happening like that. Do I need to have them all coming from the same content?

@miguelcobain
Copy link
Owner

Sorry, I didn't understand what you're trying to accomplish. Could you try to be more clear?

@lxcodes
Copy link
Contributor Author

lxcodes commented Feb 27, 2015

With below, selectedLocation is set to the correct selection of a US state and then a Mexico state afterwards, but upon selected the Mexican state, the US state is still selected in the first select control.

Maybe a case where selectedLocation isn't actually null so the selection isn't clearing. If I manually set selectedLocation to null with the Ember Inspector, it clears both. Since it's not null, it's trying to find the value in the list upon changes and doesn't know if it should clear existing? Currently working on setting three different properties and combining myself.

{{ember-selectize
    content=usaLocations
    selection=selectedLocation
    optionValuePath="value"
    optionLabelPath="label"
    placeholder=(intl-get "messages.global.selectPrompt")}}
{{ember-selectize
    content=mexicoLocations
    selection=selectedLocation
    optionValuePath="value"
    optionLabelPath="label"
    placeholder=(intl-get "messages.global.selectPrompt")}}
{{ember-selectize
    content=canadaLocations
    selection=selectedLocation
    optionValuePath="value"
    optionLabelPath="label"
    placeholder=(intl-get "messages.global.selectPrompt")}}

@lxcodes lxcodes closed this as completed Apr 10, 2015
@miguelcobain
Copy link
Owner

Is this solved?

@lxcodes
Copy link
Contributor Author

lxcodes commented Apr 10, 2015

Actually, I'm not sure why I closed this @miguelcobain >.< -- Busy busy busy morning. I went to check if it was solved and Ember Inspector isn't showing me controllers below the application. Really odd. Will reopen and check on this more this weekend probably.

@lxcodes lxcodes reopened this Apr 10, 2015
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

2 participants