Skip to content

Content: stale responses can overwrite the list on rapid filter changes #663

Closed

Description

@gkhngyk

Problem

loadData writes its results unconditionally (setOpportunities, setTotal), and the effect that calls it has no cleanup. Every filter click starts a new request without cancelling the previous one — so when a user changes filters quickly, a slower earlier response can land after the newer one and overwrite the table with rows that don't match the filters on screen. It can also set state after unmount.

Evidence

Fix

Guard the state writes with a cancelled flag set in the effect's cleanup (the linked insights pattern), so only the latest request may write.

Acceptance criteria

  • Rapidly toggling filters always ends with the table matching the selected filters, regardless of response ordering.
  • No state updates after unmount.

Activity

  1. added
    bug
    good first issue
    on Aug 7, 2026
  2. BharadwajKanneveti commented on Aug 7, 2026

    @BharadwajKanneveti
    Contributor

    @gkhngyk i will work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions