Skip to content
This repository was archived by the owner on May 17, 2018. It is now read-only.
This repository was archived by the owner on May 17, 2018. It is now read-only.

parseLinks shouldn't update state #141

@wyuenho

Description

@wyuenho

As discovered in #136 and #139, a state shouldn't be sent down from the server. The totalRecords and related states will be calculated when the new records are added to the fullCollection after fetch, thus totalRecords must and should always be equal to fullCollection.length under infinite mode. If parseLinks tries to be too smart, the state has already been updated in parseLinks, the subsequent fullCollection.add operation after fetching has the potential to give the wrong result. The behavior is too surprising.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions