Skip to content

Store previous list data #12

@ankit-agrawal11

Description

@ankit-agrawal11

Originally reported by: visheshd (Bitbucket: visheshd, GitHub: visheshd)


https://bitbucket.org/causecode/far-ui/pull-requests/3/add-section-details-data/diff#comment-34030070

In react-hero, when we change a page from pagination(or whenever a request is made to fetch a list for a given resource), the instance list in the store is overwritten by the fetched list. In all the admin listing pages it was fine because only a limited number of the list item is being displayed at a time.

But, in this case, all the previous list items also needs to be displayed (since it's a scroll view). Therefore this had to be handled.

In future, or after the far project is done, we can modify this in react-hero so that previously fetched data can be kept. For achieving this, we can add a parameter in the list function of the BaseModel: addToList: boolean = false (default value).


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingminor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions