meteor-tabular icon indicating copy to clipboard operation
meteor-tabular copied to clipboard

is there any plan to support sorting on calculated fields?

Open dipakyadav opened this issue 5 years ago • 2 comments

i.e,

  1. if user collection contains two field amt1 and amt2
  2. using columns: [{title: "toatalamt", data: 'total()'}], totalamt field doesn't exists in user collection.
  3. and meter helper as below.
User.helpers({
  total: function () {
    return this.amt1 +  this.amt2;
  }
});

The sort icon doesn't appears on totalamt column

dipakyadav avatar Feb 19 '20 03:02 dipakyadav

I doubt it at this point. The only thing meteor-tabular seems to be able to sort (and search) is native data fields on the document.

So denormalizing this value to your actual document is one work-around.

evolross avatar Feb 19 '20 17:02 evolross

Anybody have any workarounds for this? Was thinking of way to override the orderable events and then pass in a sort option to the pub

smohantyCME avatar Sep 16 '21 19:09 smohantyCME