Skip to content

How can I sort column based on some value instead of displayed text? #143

@imanabidi

Description

@imanabidi

my problem:

I am using the following datetime convert to display the result. but when this column sorts it uses the values of fromNow() output [an hour ago, 2 hours ago,7 months ago, 2 minutes ago] and sorting becomes invalid.

converters: {
datetime: {
from: function (value) { return moment(value); },
to: function(value) {
return moment(value).fromNow();
}
},

how can i fix this problem?

  • force the sort to use another value?
  • showing fromNow() values in cell tooltips for this columnwhich i tried and does not worked well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions