Open gozcan opened 7 years ago
@gozcan At this stage there is no config to support this. This is by design to prevent components depending on each other. I used to have the datatable
emit a sort
event when you clicked the column to sort but I've since removed it while I was changing the structure of the component around.
Once I put the sort
event back on the component you can just listen to that event and sort the original data based on that column. It would probably look something like this:
<paginator :source="sortedData" :page-size="5">
<template scope="page">
<datatable :source="page.data" @sort="sortData(columnId, direction)">
<!-- Datatable columns & templates -->
</datatable>
</template>
</paginator>
hi @andrewcourtice any workaround to achieve this ?
Hey, I guess when you use paginator on a datatable; since you bind paginator's page data to datatable, it only sorts displayed data rather than whole dataset. Is there a config to prevent this?