Skip to content

Commit

Permalink
Persist filter modal state after it's closed (#4412)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAndrewJackson authored Nov 10, 2023
1 parent 59211ea commit e8d934c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ The types of changes are:
- "isServiceSpecific" default updated when building TC strings on the frontend [#4384](https://github.com/ethyca/fides/pull/4384)
- Redact cli, database, and redis configuration information from GET api/v1/config API request responses. [#4379](https://github.com/ethyca/fides/pull/4379)

### Fixed
- Persist bulk system add filter modal state [#4412](https://github.com/ethyca/fides/pull/4412)

## [2.23.3](https://github.com/ethyca/fides/compare/2.23.2...2.23.3)

### Fixed
Expand Down
9 changes: 9 additions & 0 deletions clients/admin-ui/cypress/e2e/systems-plus.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,15 @@ describe("System management with Plus features", () => {
cy.getByTestId("column-vendor_id").should("exist");
});

it("filter modal state is persisted after modal is closed", () => {
cy.visit(ADD_SYSTEMS_MULTIPLE_ROUTE);
cy.getByTestId("filter-multiple-systems-btn").click();
cy.get("#checkbox-gvl").check({ force: true });
cy.getByTestId("filter-done-btn").click();
cy.getByTestId("filter-multiple-systems-btn").click();
cy.get("#checkbox-gvl").should("be.checked");
});

it("pagination menu updates pagesize", () => {
cy.visit(ADD_SYSTEMS_MULTIPLE_ROUTE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ const SystemInformationForm = ({
};

const handleVendorSelected = (newVendorId: string) => {
console.log("hello from handleVendorSelected");
if (
features.tcf &&
extractVendorSource(newVendorId) === VendorSources.GVL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,11 @@ export const AddMultipleSystems = ({ redirectRoute }: Props) => {
totalSelectSystemsLength > 1 ? "s" : ""
}`}
/>
{isFilterOpen ? (
<MultipleSystemsFilterModal
isOpen={isFilterOpen}
onClose={onCloseFilter}
tableInstance={tableInstance}
/>
) : null}
<MultipleSystemsFilterModal
isOpen={isFilterOpen}
onClose={onCloseFilter}
tableInstance={tableInstance}
/>
<TableActionBar>
<GlobalFilterV2
globalFilter={globalFilter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const FilterCheckbox = ({
value,
}: FilterCheckboxProps) => (
<Checkbox
id={`checkbox-${value}`}
value={value}
key={value}
height="20px"
Expand Down Expand Up @@ -138,6 +139,7 @@ const MultipleSystemsFilterModal = <T,>({
Reset Filters
</Button>
<Button
data-testid="filter-done-btn"
colorScheme="primary"
size="sm"
onClick={onClose}
Expand Down

0 comments on commit e8d934c

Please sign in to comment.