Skip to content

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

@rogeraraujo90

Description

@rogeraraujo90

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions