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

Infinite rendering error in Octane preview displaying models sorted in component #1077

Open
CodingItWrong opened this issue Apr 14, 2019 · 0 comments

Comments

@CodingItWrong
Copy link

CodingItWrong commented Apr 14, 2019

I get an "infinite rendering error detected" when I do the following in the Octane preview:

  • The route loads some models
  • The models are passed directly into a component
  • The component sorts the models
  • The sorted models are used as the options for Ember Paper Select

Things that don't cause the error:

  • If you sort the models in the controller instead of in the component, you don't get the error
  • If you simply render the sorted models with an {{#each}}, instead of passing them into a Paper Select, you don't get the error
  • Doing all of the above on Ember 3.9.0 stable (instead of the Octane preview) doesn't result in the error

Minimal reproduction: https://github.com/CodingItWrong/octane-paper-sort

The following is how I am doing the sorting in the component:

export default class WidgetFormComponent extends Component {
  sortProperties = Object.freeze(['id:desc']);

  @sort('args.widgets', 'sortProperties')
  sortedWidgets;
}

Then invoking like so:

{{#paper-select
  label="Widget"
  options=this.sortedWidgets
  selected=this.selectedWidget
  onChange=(action (mut this.selectedWidget))
  as |widget|
}}
  {{widget.name}}
{{/paper-select}}
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