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

ember-data:deprecate-array-like if rows is a Record #982

Open
rogeraraujo90 opened this issue Apr 17, 2023 · 0 comments
Open

ember-data:deprecate-array-like if rows is a Record #982

rogeraraujo90 opened this issue Apr 17, 2023 · 0 comments

Comments

@rogeraraujo90
Copy link

This deprecation is being thrown when we use an array of ember-data records as rows:

deprecate.js:131 DEPRECATION: The objectAt method on the class RecordArray is deprecated. Use the native array method at instead. [deprecation id: ember-data:deprecate-array-like] This will be removed in Ember 5.0.

We can convert the record array to a pure JS array to fix the deprecation:

get rows() {
  return this.records.slice();
}

Will ember-table handle this internally in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant