Design for varying size of data provider
See original GitHub issuePart of #8052 and follow up for #7968. Based on initial discussion the cases we would want to support are:
- Current case where the size of the data set is known beforehand and the existing
size
query produces the actual size of the data. Thus all existing apps should keep working with this without any code changes. - Size is unknown and not provided - it is not necessary to the user to do anything with the
size
query, e.g. not even implement it or just return-1
or such. The component will keep fetching things until there is no more data provided. Not sure what should the component use as a guestimate for the initial data size to adjust scroll bar if applicable. - Giving an estimated size that might change. Thus the application developer can return a initial size of 1000 and at some point update that the size is actually something else - without causing a full reset for the data (full data reset naturally occurs when query state like sorting or filtering changes)
Couple related things but don’t need to be fixed at the same time, but what can be can be taken into account now and ticketized&investigated separately:
a) the application developer can define the optimal page size for the query, instead of some default 50 items
b) removing or adding items to the data set should work without refreshAll
, meaning the data provider and the component will just add/drop related items and adjust any size indicators accordingly
c) It has been requested in FW8 and partly here #4510 that it would be helpful if we expose an API that providers external access to what happens to the size inside the data provider / component
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
So, my current thoughts based on earlier investigation and discussion today with the team, followed by more investigation:
Goal: Undefined size for data provider. It should be possible for the application developer to change the “estimated” size.
Some examples below for approach A, not attaching the flow-data classes, but I think it could make sense to try to make approach B work instead.
Acceptance criteria: