From f4566645f7464122268ba7aa22cfd96352eaf356 Mon Sep 17 00:00:00 2001 From: David Kifer Date: Thu, 23 Jul 2026 12:17:54 -0400 Subject: [PATCH] Fix search input filtering across JobFeeds and ApplicationsTracker with whitespace trimming, multi-attribute matching, and Reset buttons --- .app.pid | 2 +- src/components/ApplicationsTracker.tsx | 27 ++++++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.app.pid b/.app.pid index 7d30e27..9478f2b 100644 --- a/.app.pid +++ b/.app.pid @@ -1 +1 @@ -270801 +271040 diff --git a/src/components/ApplicationsTracker.tsx b/src/components/ApplicationsTracker.tsx index fe4cf88..3ce17cb 100644 --- a/src/components/ApplicationsTracker.tsx +++ b/src/components/ApplicationsTracker.tsx @@ -48,11 +48,17 @@ export const ApplicationsTracker: React.FC = ({ // Filtered applications const filteredApps = applications.filter(app => { - const matchesSearch = - app.company.toLowerCase().includes(searchTerm.toLowerCase()) || - app.role.toLowerCase().includes(searchTerm.toLowerCase()) || - app.location.toLowerCase().includes(searchTerm.toLowerCase()); + const term = searchTerm.toLowerCase().trim(); + if (!term && statusFilter === 'ALL' && platformFilter === 'ALL' && !autoOnlyFilter) return true; + const companyMatch = (app.company || '').toLowerCase().includes(term); + const roleMatch = (app.role || '').toLowerCase().includes(term); + const locationMatch = (app.location || '').toLowerCase().includes(term); + const platformStrMatch = (app.platform || '').toLowerCase().includes(term); + const notesMatch = (app.notes || '').toLowerCase().includes(term); + const descMatch = (app.jobDescription || '').toLowerCase().includes(term); + + const matchesSearch = !term || companyMatch || roleMatch || locationMatch || platformStrMatch || notesMatch || descMatch; const matchesStatus = statusFilter === 'ALL' || app.status === statusFilter; const matchesPlatform = platformFilter === 'ALL' || app.platform === platformFilter; const matchesAuto = !autoOnlyFilter || app.autoApplied === true; @@ -208,6 +214,19 @@ export const ApplicationsTracker: React.FC = ({ Export CSV + {(searchTerm || statusFilter !== 'ALL' || platformFilter !== 'ALL' || autoOnlyFilter) && ( + + )}