ted-marozzi / data-grid

High Performance Data Grid optimised for large numeric tables.
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

feat: column non-sortability #7

Open defuncart opened 2 years ago

defuncart commented 2 years ago

Adds the ability to not be able to sort a column. Seems to work well in example app, let me know if anything needs to be changed.

ted-marozzi commented 2 years ago

We will need to update the calculateAutoFitColumnWidth to exclude the sortIcon and we also need to rethink this constructor: https://github.com/ted-marozzi/data-grid/blob/main/lib/data_grid.dart#L381-L382

If a column isn't sortable then we don't need a sortValue. Perhaps make this optional and do something to prevent a user having sortable = true and no sort value or sortable = false and a sort value (asserts or preferably statics type saftey if possible).

Also do you want to become a maintainer to make it easier to submit changes?

defuncart commented 2 years ago

Excluded sort icon in column header and width calculation. Will have a think about updating GridCell's api.