Skip to content

fix(dvz-ui): fix reset filters to be enabled when filters change - #301

Merged
ralvarez-dg merged 2 commits into
mainfrom
fix/fix-reset-filters-to-be-enabled
Sep 25, 2026
Merged

ralvarez-dg merged 2 commits into
mainfrom
fix/fix-reset-filters-to-be-enabled

Conversation

@timothy-mugo

Copy link
Copy Markdown
Contributor

Description

Type of change

  • Bug fix (fix:)
  • New feature (feat:)
  • Breaking change (BREAKING CHANGE:)
  • Refactor / chore (refactor: / chore:)
  • Documentation update (docs:)

Affected package(s)

  • @devgateway/dvz-ui-react
  • @devgateway/wp-react-lib
  • example only (no changeset needed)

Checklist

  • PR title follows Conventional Commits format
  • A changeset has been added (pnpm changeset) for any change to a published package
  • pnpm build passes locally
  • pnpm --filter @devgateway/* typecheck passes
  • No hardcoded credentials, internal URLs, client names, or PII introduced
  • Any new dependency has an Apache-2.0-compatible license

Copilot AI lite review requested due to automatic review settings September 25, 2026 15:45
@pkg-pr-new

pkg-pr-new Bot commented Sep 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@devgateway/dvz-ui-react@6e71426
pnpm add https://pkg.pr.new/@devgateway/wp-react-lib@6e71426

commit: 6e71426

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The reset logic must handle cleared sentinel values when comparing against non-empty initial values.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes the filter reset button so it enables when filter values change.

Changes:

  • Updates filter comparison logic.
  • Adds a patch changeset.
File Summary
packages/​dvz-ui/​src/​embeddable/​filter-reset-button/​index.tsx Updates reset-button enablement; clearing a filter can still leave Reset disabled when initial values include a real default.
.changeset/​honest-ducks-spend.md Documents the patch release.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +38 to 39
return initialValues.length !== filteredApplied.length ||
!initialValues.every(v => filteredApplied.includes(v));
@ralvarez-dg
ralvarez-dg self-requested a review September 25, 2026 15:49
@ralvarez-dg
ralvarez-dg merged commit ad68c35 into main Sep 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants