mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user