django-tables2 icon indicating copy to clipboard operation
django-tables2 copied to clipboard

Ordering of missing values for ListData

Open usajusaj opened this issue 7 years ago • 3 comments

Missing values in List of dicts table are pulled to the top when using ascending sorting. This might be unexpected for some users, therefore it would be convenient having an "order_null_last" or similar parameter in table meta/kwargs. I've made a hard-coded quick fix in a fork here: https://github.com/usajusaj/django-tables2/commit/ec27b7ff5915bee1fc0c431c00696599c9107311 but that's far from being a proper solution.

usajusaj avatar Jan 11 '18 18:01 usajusaj

Fixing the edge-cases of sorting ListData is not something very high on my list, as we use the database to do the sorting in most if not all of our production code. If someone has the need, patches are welcome, but make sure to include proper testing.

jieter avatar Feb 14 '18 21:02 jieter

Very much need this!

sanderbrauwers avatar Jun 20 '19 06:06 sanderbrauwers

Like I said: patches welcome!

jieter avatar Jun 20 '19 08:06 jieter