How can I exclude data based on my condition on the addColumn function?
What I tried is this but it will include records that are > 0
->addColumn('total', function ($row) {
$arr = array(abs($row->fba_fee_count),abs($row->referral_fee_count));
if($arr > 0) {
return array_sum($arr);
}
On the frontend side, I also tried
"createdRow": function( row, data, dataIndex ) {
if ( data.total === 0 ) {
$(row).hide();
}
},
Now it hides the data but the pagination is showing for all the data. As you can see in the image below. I got 3 records but the pagination is for all the records.
Anyone can help? Thanks in advance.