angular-ui/ui-grid

Sort function is guessed as sortAlpha and cached when sort applied to empty grid

Open

#5.279 geöffnet am 4. Apr. 2016

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (2.496 Forks)batch import
help wanted

Repository-Metriken

Stars
 (5.395 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide