Describe the bug 🐞
For some scenario that requires lazy load, an initial virtualize window size 0 is expected. However, when a virtual request has size of 0, the SortAndVirtualize will ignore the request and emit all items to downstream.
I think this is the code that caused this problem, if the size is 0, the request is ignored.
var paramsChanged = _virtualRequests.Synchronize(locker)
.DistinctUntilChanged()
// exclude dodgy params
.Where(parameters => parameters is { StartIndex: >= 0, Size: > 0 })
.Select(request =>
{
virtualParams = request;
// have not received the comparer yet
if (applicator is null) return Empty;
// re-apply virtual changes
return ApplyVirtualChanges();
});
Step to reproduce
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Reproduction repository
https://github.com/Snailya/SortAndVirtualizeTest
Expected behavior
if size 0 is allowed, the downstream should have no item.
if not, a validation for the size is need to notify the coder.
Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
DynamicData Version
No response
Additional information ℹ️
No response
Describe the bug 🐞
For some scenario that requires lazy load, an initial virtualize window size 0 is expected. However, when a virtual request has size of 0, the
SortAndVirtualizewill ignore the request and emit all items to downstream.I think this is the code that caused this problem, if the size is 0, the request is ignored.
Step to reproduce
Reproduction repository
https://github.com/Snailya/SortAndVirtualizeTest
Expected behavior
if size 0 is allowed, the downstream should have no item.
if not, a validation for the size is need to notify the coder.
Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
DynamicData Version
No response
Additional information ℹ️
No response