tomasweigenast / paged-datatable

A DataTable widget for Flutter that supports cursor/offset pagination, filters and sorting
https://pub.dev/packages/paged_datatable
MIT License
15 stars 11 forks source link

Table does not use full width #26

Closed philitell closed 5 days ago

philitell commented 1 month ago

I'm trying to migrate from version 1.4.3 to 2.1 in a flutter web-project but i'm not able to achieve same results. I'm using 10 TableColumns and it seems that the table does not use all available space (with and without specified sizes). When i use FractionalColumnSizes (where all values sum up to 1) one column seems to disappear. Furthermore, when i resize the table, no horizontal scroll bar is shown.

Result from version 2.1 Bildschirmfoto vom 2024-06-11 09-33-55

Result from version 1.4.3 Bildschirmfoto vom 2024-06-11 09-34-20

philitell commented 1 month ago

Here is a reproducible example: "table_test_page.dart" in https://github.com/philitell/paged_data_table_test

philitell commented 1 month ago

Do you have any tips for me how to solve this issue?

tomasweigenast commented 1 month ago

I think the problem is because you use FractionalColumnSize(.1) in every column. Applying RemainingColumnSize to the last column solves the issue (I tested it in your code). I will keep this open because I don't know if we should consider this as an issue or not

philitell commented 1 month ago

Thank you very much!!

costanzaminarelli commented 1 week ago

This fix doesn't make sense. If FractionalColumnSize is a percentage value, and I have 10 columns each with FractionalColumnSize(.1), I expect each column to occupy 10% of the available space. However, this doesn't happen, and I end up with unused white space at the end of the table.

tomasweigenast commented 1 week ago

Yes, that is why I kept this issue open. I will continue working to fix it

tomasweigenast commented 5 days ago

Fixed!