Open kyurikotpq opened 3 weeks ago
When the filter query is cleared, only the category of symptoms that has items matching the previous query is shown.
All of the symptoms should be shown if the query string = ""
This is a dumb one. There's no else statement in here (tracking.tsx):
tracking.tsx
useEffect(() => { if (searchQuery.length > 2) { setFilteredSymptoms( SYMPTOMS_CATEGORIZED.filter((category) => category.items.some((symptom) => isSymptom(symptom.label)) ) ); } }, [searchQuery]);
Description
When the filter query is cleared, only the category of symptoms that has items matching the previous query is shown.
Reproducible Example
Expected behavior
All of the symptoms should be shown if the query string = ""
Potential Code to Rewrite
This is a dumb one. There's no else statement in here (
tracking.tsx
):