I tried onclick for tbody element like td,tr but not triggering any event.
Hi,
Thank you for reaching out to us.
You can find the basic sorting functionality using an example in our Datatable document,
https://keenthemes.com/metronic/tailwind/docs/components/datatable#static
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Thanks for answer. I need to this event for icons in tbody childs like tr. I am using react and I need to select row and fetch some data on click icon.
Hi,
I want to apologize for the late reply.
Have you tried using the sort
event of KTDataTable?
const datatable = new KTDataTable(datatableEl, options);
datatable.on("sort", () => {
console.log("sort data");
});
I am using Metronic Tailwind Datatables like this
<div
data-datatable="true"
data-datatable-page-size="10"
data-datatable-state-save="true"
>
<div className="scrollable-x-auto">
<table
className="table table-border table-fixed"
data-datatable-table="true"
>