You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the Grid widget is good for smaller lists and provides very flexible layout options, some applications need to be able to display lists that have an order of magnitude larger amount of data that isn't feasible to load into memory in one chunk.
While the Grid widget has access to all of its children, this widget will not. It must make layout decisions without being able to ask all of the children for their measurements. We need to abstract access to the data using a DataSource trait that might look something like:
This interface does not attempt to solve widget reuse. Overall, I don't believe the allocations on a per-row basis should be worried about. The major savings of this widget is to avoid loading millions of widgets at a time.
Other problems that need to be considered:
Column management. How do the data source and the data grid agree on columns? Is the user just expected to make this work? Does the data grid support changing columns or does that require creating a new data grid with a new data source?
Row heights. Without knowing the height of each row, we can't determine the total scrollable area or how much each pixel of movement of the scrollbar impacts scrolling the list. Many frameworks force a consistent row height. Some make some concessions to allow flexible row heights. I would prefer flexible row heights, but also am happy to keep things simple.
Headers/Footers: We should probably have support for one or more header and footer rows that do not scroll with the list.
Ideally we can share code between the Grid and Stack. For that reason, it may make sense to tackle this after #126.
The text was updated successfully, but these errors were encountered:
In #202 a VirtualList widget has been added. It doesn't support columns yet and is currently fixed row-height. But it probably can be used as the basis for a columnar data grid widget.
While the
Grid
widget is good for smaller lists and provides very flexible layout options, some applications need to be able to display lists that have an order of magnitude larger amount of data that isn't feasible to load into memory in one chunk.While the
Grid
widget has access to all of its children, this widget will not. It must make layout decisions without being able to ask all of the children for their measurements. We need to abstract access to the data using aDataSource
trait that might look something like:This interface does not attempt to solve widget reuse. Overall, I don't believe the allocations on a per-row basis should be worried about. The major savings of this widget is to avoid loading millions of widgets at a time.
Other problems that need to be considered:
Ideally we can share code between the
Grid
andStack
. For that reason, it may make sense to tackle this after #126.The text was updated successfully, but these errors were encountered: