DEV: Update custom array implementations for Ember 5 compatibility (#24435)

In the long term we should aim to modernize these places, but for now this change will make them compatible with Ember 5.x (while maintaining compatibility with Ember 3.28)
This commit is contained in:
David Taylor
2023-11-20 13:26:46 +00:00
committed by GitHub
parent ba61ea17b6
commit 18461e38cf
4 changed files with 38 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
import { arrayContentDidChange } from "@ember/-internals/metal";
import Component from "@ember/component";
import { action } from "@ember/object";
import { empty } from "@ember/object/computed";
@@ -33,7 +34,7 @@ export default class SimpleList extends Component {
@action
changeValue(index, event) {
this.collection.replace(index, 1, [event.target.value]);
this.collection.arrayContentDidChange(index);
arrayContentDidChange(this.collection, index);
this._onChange();
}