Skip to content

How we can change the firstPageKey to reevaluate query? #41

@francescreig

Description

@francescreig

Imagine that you are using the same widget to render a list of items, but you want to apply one filter to the list, so that it refetches again the items, but with the updated query. In my case the filters (and pagination) are treated in the firstPageKey.

The problem resides in that when I rebuild the widget passing another filters to the firstPageKey, since the StateNotifierProvider is already alive, it does not update its values, since they are declared once when building the initial state (on super constructor). How we could be the best way to solve this problem? Refreshing the provider?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions