Skip to content

Support for Clear and Reset #9

@starnutoditopo

Description

@starnutoditopo

Support for Clear and reset is not currently implemented.
Use case: the generating datasource has changed and the collection needs to be refreshed. The attached zip file contains a modified version of the sample app that displays 3 buttons to reset the collection.

I would suggest adding the following method to IncrementalLoadingCollection.cs:

    protected override void ClearItems()
    {
        base.ClearItems();
        _dataSourceCount = null;
        AsyncInfo.Run(token => LoadMoreItemsFromDataSourceAsync(1))
            .GetAwaiter()
            .GetResult();
    }

IncrementalLoadingCollection.SampleApp.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions