haxeui-core icon indicating copy to clipboard operation
haxeui-core copied to clipboard

[Feature request] Add SortDirection for sortCustom dataSource

Open flashultra opened this issue 3 years ago • 1 comments

At the moment it's not possible to use SortDirection ( ASCENDING / DESCENDING ) in a sortCustom function (DataSource type). So if I need to sort a field in ascending and descending order, I will need to create two separate functions.

flashultra avatar Oct 12 '22 14:10 flashultra

Good catch, yeah, ill add it :)

ianharrigan avatar Oct 17 '22 12:10 ianharrigan

So actually, looking at this, im not sure its possible, the reason is that is ArrayDataSource sortCustom uses array.sort (haxe inbuilt) and that has a function signature of T->T->Int, and i cant change that, so im not sure how i would pass the "direction" parameter down to that function

ianharrigan avatar Oct 19 '22 07:10 ianharrigan

Actually, nvm - i think this should be fixed now in latest haxeui core... if this works for you can you close the issue please?

Cheers. Ian

ianharrigan avatar Oct 19 '22 07:10 ianharrigan

Thank you Ian!

flashultra avatar Oct 19 '22 09:10 flashultra