Skip to content

Commit

Permalink
sort should also sort any filtered data
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Feb 27, 2024
1 parent fb155fb commit 5e95236
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions haxe/ui/data/ArrayDataSource.hx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class ArrayDataSource<T> extends DataSource<T> {

public override function sortCustom(fn:T->T->SortDirection->Int, direction:SortDirection = null) {
_array.sort(fn.bind(_, _, direction));
if (_filteredArray != null) {
_filteredArray.sort(fn.bind(_, _, direction));
}
handleChanged();
}

Expand Down

0 comments on commit 5e95236

Please sign in to comment.