From d877bea0e3910ba9beb820f357e630180e354d0c Mon Sep 17 00:00:00 2001 From: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com> Date: Thu, 23 Apr 2026 16:03:33 +0200 Subject: [PATCH] chore(ui): unify filter search and batch patterns (#10859) --- ui/CHANGELOG.md | 1 + .../providers/providers-filters.test.tsx | 92 +++++++++++++++++++ ui/components/providers/providers-filters.tsx | 44 ++++++++- .../shadcn/select/multiselect.test.tsx | 36 +++++++- .../data-table-filter-custom-batch.test.tsx | 19 +++- .../ui/table/data-table-filter-custom.tsx | 43 ++++++++- 6 files changed, 230 insertions(+), 5 deletions(-) create mode 100644 ui/components/providers/providers-filters.test.tsx diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index d3bcf9f4a2..92dbb7ecc1 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to the **Prowler UI** are documented in this file. - Redesign compliance page, client-side search for compliance frameworks, compact scan selector trigger, enhanced compliance cards [(#10767)](https://github.com/prowler-cloud/prowler/pull/10767) - Allows tenant owners to expel users from their organizations [(#10787)](https://github.com/prowler-cloud/prowler/pull/10787) +- Shared filter dropdowns now support local option search and auto-scroll to the first visible match across table and provider filters [(#10859)](https://github.com/prowler-cloud/prowler/pull/10859) - Backward-compatibility middleware redirect from `/sign-up?invitation_token=…` to `/invitation/accept?invitation_token=…`; new invitation emails use `/invitation/accept` directly [(#10797)](https://github.com/prowler-cloud/prowler/pull/10797) --- diff --git a/ui/components/providers/providers-filters.test.tsx b/ui/components/providers/providers-filters.test.tsx new file mode 100644 index 0000000000..b6e6655247 --- /dev/null +++ b/ui/components/providers/providers-filters.test.tsx @@ -0,0 +1,92 @@ +import { render, screen } from "@testing-library/react"; +import { describe, expect, it, vi } from "vitest"; + +import type { FilterOption } from "@/types/filters"; +import type { ProviderProps } from "@/types/providers"; + +vi.mock("next/navigation", () => ({ + useSearchParams: () => new URLSearchParams(), +})); + +vi.mock("@/hooks/use-url-filters", () => ({ + useUrlFilters: () => ({ updateFilter: vi.fn() }), +})); + +vi.mock("@/app/(prowler)/_overview/_components/provider-type-selector", () => ({ + ProviderTypeSelector: () =>