akveo / akveo/ng2-smart-table

Pipes for data display?

未关闭
#65 2 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
1.6k
派生
867
PR 合并指标
30 天内没有已合并 PR

描述

I have a use case, where I have a table of issues and the period of time they took to be resolved. The time they take to be resolved varies from several minutes, to several days. So I use a [MomentJS Pipe](https://github.com/urish/angular2-moment) to parse the times into a human readable form, e.g. `2 hours` or `14 minutes`. However, this poses an error with table sorting, as 14 is bigger than 2, so it gets put above it in the table.

I believe the ideal solution is to be able to leave the data in its raw form before it's passed to the table and then specify a display pipe which the module can apply after sort (but before search?)?

What do you think?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。