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

x-option declared without x-select error #99

Closed
horacekj opened this issue Mar 7, 2016 · 5 comments
Closed

x-option declared without x-select error #99

horacekj opened this issue Mar 7, 2016 · 5 comments

Comments

@horacekj
Copy link

horacekj commented Mar 7, 2016

Version of x-select:

2.0.2

Ember Version / Ember CLI Version:

1.13.15

Problem:

{{#x-select value=task class="form-control"}}
  {{#x-option value=""}}Všechny úlohy{{/x-option}}
    {{#each tasks as |t|}}
      {{#x-option value=t}}{{t.title}}{{/x-option}}
    {{/each}}
{{/x-select}}

tasks is computed property. When tasks changes, browser logs to console: Error: Assertion Failed: x-option component declared without enclosing x-select.

I expect x-option to update its items withnout prompting any error.

Steps To Reproduce:

Simply declare tasks as computed property and template as showed above.

@Robdel12
Copy link
Collaborator

Robdel12 commented Mar 7, 2016

Thanks! I'll take a look tonight after work :)

@horacekj
Copy link
Author

horacekj commented Mar 7, 2016

Thank you very much :-).

@horacekj
Copy link
Author

horacekj commented Mar 7, 2016

Just a few more info to understand my problem better (and to reproduce it):
My template contains two x-selects. Options of second x-select are based on the selected value of first x-select. Eg. if I choose "Dark side" in the first x-select, items of second x-select should become "Darth Vader, Darth Sidious"; when I choose "Light side" in the first x-select, items in second x-select should become "Luke, Anakin".

Options are filled into the second x-select correctly, but error is logged too. When I select different item in second x-select, x-select`s "value" is not changed.

@Robdel12
Copy link
Collaborator

Robdel12 commented Mar 9, 2016

Hi @horacekj!

What version of ember are you on? I'm trying to replicate and can't seem to get the error. We also have a test that's similar to this use case.

Robdel12 added a commit that referenced this issue Mar 10, 2016
@Robdel12 Robdel12 removed this from the v2.1.0 milestone Mar 11, 2016
@Robdel12
Copy link
Collaborator

Robdel12 commented Apr 8, 2016

I'm going to close this since it's been a month now. If this is still an issue feel free to comment

@Robdel12 Robdel12 closed this as completed Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants