cljfx

Elia 2022-08-03T12:20:06.473229Z

I created a simple table-view with multiple string/number columns. How can I sort the table clicking on the column header? It's not sorting based on the column value but following some string comparison on the item map I think. Is there a pattern I've to follow?

vlaaad 2022-08-10T08:54:48.283379Z

Your table column should use cell value factory to extract string/number from the map, iirc after that it will sort by that value

vlaaad 2022-08-10T08:57:11.935599Z

I.e. like this https://github.com/cljfx/cljfx/blob/master/examples/e16_cell_factories.clj#L20, but :cell-value-factory :my-map-key