Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there any plan to support sorting on calculated fields? #434

Open
dipakyadav opened this issue Feb 19, 2020 · 2 comments
Open

is there any plan to support sorting on calculated fields? #434

dipakyadav opened this issue Feb 19, 2020 · 2 comments

Comments

@dipakyadav
Copy link

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

@evolross
Copy link

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.

@smohantyCME
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants