Sort by column headers in custom tables

I have a doc type where I have a table presented with data pulled from an API. I want to be able to sort it by the column header.

I don’t think frappe has this functionality built in even for the built in modules, such as item listing, crm, etc. It would be nice since it helps to sort by alphabetical or other column names.

are you using rest api?

if yes there are many options to play with.

http://localhost:8080/api/resource/Customer?order_by=creation desc&limit_page_length=100

use can use other params too

This is not an API or DB sort issue, this is an UI issue.