This works by default if you have your Data Source set to Database or XPath. If you use a Microflow or Association as the data source, it will disable the sort feature.
thank you , how i can retrieve the result of my microflow ( this microflow work on two way for both of them return a different list ) with a data source entity or a xpath ?
If you are working with a listview, you can use the listview controls from the appstore.
It’s a bundle of widgets for listviews. And it contains a header sort widget which fits your usecase.
Keep in mind that this does not work if you fill your listview by use of datasource microflow though.