mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Fix a bug in sixtyfps.ArrayModel.remove
Report the correct index/size to the runtime. Also added convenience entries()/values() functions that forward to the array.
This commit is contained in:
parent
b6655d0049
commit
c59b1e61ac
1 changed files with 9 additions and 1 deletions
|
@ -204,7 +204,15 @@ class ArrayModel<T> implements Model<T> {
|
|||
*/
|
||||
remove(index: number, size: number) {
|
||||
let r = this.a.splice(index, size);
|
||||
this.notify.rowRemoved(size, arguments.length);
|
||||
this.notify.rowRemoved(index, size);
|
||||
}
|
||||
|
||||
values(): IterableIterator<T> {
|
||||
return this.a.values();
|
||||
}
|
||||
|
||||
entries(): IterableIterator<[number, T]> {
|
||||
return this.a.entries()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue