ember-data:deprecate-array-like if rows is a Record
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 351
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 1
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining how ember-table consumes the rows value when it is an Ember Data RecordArray, using the reported objectAt deprecation as the reproduction signal. Compare that behavior with the records.slice() workaround; done means an array of Ember Data records can be used as rows without emitting ember-data:deprecate-array-like.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100