angular-ui/ui-grid
在 GitHub 查看Sort function is guessed as sortAlpha and cached when sort applied to empty grid
Open
#5,279 创建于 2016年4月4日
help wanted
仓库指标
- Star
- (5,395 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
When there is no data in the grid and the user clicks to sort a column, the row sort function will be cached based on the guess (sortAlpha). Say this is a numeric column and you later add data, it will always sort as alpha because the guess was cached.
Workaround (and probably best practice): specify explicitly rather than rely on guess. But it's possible to accidentally rely on guess.
- This is a bug report, not a question on how to use the grid.
Use Stack Overflow or Gitter for questions. - You have searched the open issues to see if this bug has been filed before. We don't want duplicate issues.
- You have reviewed the tutorials and documentation to ensure you are using the grid correctly. ui-grid.info
- You are using the latest version of the grid. Older versions are not patched or supported.
- You have provided steps to recreate your bug. A plunkr is even better.