Skip to content

Conversation

@WarrickT
Copy link

Overview

  • Resolves "Persistent filters" bug

src/pages/Orders/Orders.tsx

  • Removed automatic filter clearing on mount
  • Ensured orders are fetched using persisted filters on refresh/navigation

src/slices/order/adminOrderSlice.ts

  • Persisted order filters in frontend state
  • Fixed status count calculation by separating filtered order fetches from unfiltered count fetches
  • Added logic to keep status chips consistent after refresh

src/components/orders/OrdersFilter/OrderFilter.tsx

  • Initialized Formik filter UI from Redux state instead of blank
  • Enabled reinitialization so checkboxes/radio buttons reflect persisted filters

src/components/orders/OrdersSearch/OrdersSearch.tsx

  • Synced search input initial value with Redux filters
  • Enabled Formik reinitialization so the search field reflects persisted state

Unit Tests Created

  • Refreshing Page
  • Clicking off to another tab

Steps to QA

  • Please try to find more ways to break it 🙏

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant