Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset search term with Clear All Filters button (CRASM-2246) #800

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

hawkishpolicy
Copy link
Collaborator

@hawkishpolicy hawkishpolicy commented Feb 19, 2025

  • Reset search term and filters in Filter Drawer with Clear All Filters button

🗣 Description

  • Refactored Clear All Filters button to use setSearchTerm function to reset search term to an empty string and clear filters.
  • This change renders clearFilters function unnecessary and has been removed.
  • Removed clearFilters function from FilterDrawerV2.tsx, DrawerInterior.tsx, Risk.tsx, and Inventory.tsx.
  • Cleaned up html and css in DrawerInterior.tsx.

💭 Motivation and context

  • Closes CRASM-2246

🧪 Testing

  • tested locally

📷 Screenshots (if appropriate)

Screenshot 2025-02-19 at 4 19 30 PM Screenshot 2025-02-19 at 4 20 20 PM Screenshot 2025-02-19 at 4 20 33 PM

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

- Refactored Clear All Filters button to use setSearchTerm function to reset search term to an empty string and clear filters.
- This change renders clearFilters function unnecessary and has been removed.
- Removed clearFilters function from FilterDrawerV2.tsx, DrawerInterior.tsx, Risk.tsx, and Inventory.tsx.
- Cleaned up html and css in DrawerInterior.tsx.
- Region and Organization filters are not reset when advanced filters are cleared.
- Edited button text to from "Clear All Filters" to "Clear Filters".
- Button only remders when advanced filters are applied.
Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review done in group review

Copy link
Collaborator

@rapidray12 rapidray12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review done in a group review

@rapidray12 rapidray12 merged commit 708223e into develop Feb 20, 2025
13 of 14 checks passed
@rapidray12 rapidray12 deleted the Fix-Clear-Search-Bar-CRASM-2246 branch February 20, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants