Skip to content

Fix: Combine global and local search with AND logic#305

Merged
Eniola3321 merged 2 commits intoANYTECHS:mainfrom
kingjosmel:fix/dual-search-filter
Apr 29, 2026
Merged

Fix: Combine global and local search with AND logic#305
Eniola3321 merged 2 commits intoANYTECHS:mainfrom
kingjosmel:fix/dual-search-filter

Conversation

@kingjosmel
Copy link
Copy Markdown
Contributor

Fix: Combine Global and Local Search with AND Logic

close #221

Problem

When both the global header search and local table search were active, the local search was silently ignored. Users typing in the table search input while a global search was active would see no effect with no visual explanation.

Solution

Updated EarningsTable.tsx to combine both search filters using AND logic instead of OR, ensuring transactions must match both active searches simultaneously.

Changes

  • Search Logic: Changed from OR to AND — both searches now work together
  • Helper Function: Added matchesSearchTerm() to check transaction matches against search terms
  • Visual Indicators:
    • Badge shows "Global search active" when applicable
    • Input styling changes (border/background) to indicate active global search
    • Filter summary displays both active searches below the inputs
  • User Feedback: Improved no-results message showing which searches resulted in no matches

Acceptance Criteria ✅

  • Local search is not ignored when global search is active
  • Active filter sources are clearly communicated in the UI
  • Users can easily understand which searches are active and refine their results

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@kingjosmel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Eniola3321 Eniola3321 merged commit 05efadf into ANYTECHS:main Apr 29, 2026
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.

EarningsTable search combines global and local search in a confusing way — global search is silently overridden

2 participants