Skip to content

fix: prevent filter dropdown from opening when disabled#112

Merged
tmccoy14 merged 1 commit into
mainfrom
fix/filter-dropdown-disabled-opens
Jul 8, 2026
Merged

fix: prevent filter dropdown from opening when disabled#112
tmccoy14 merged 1 commit into
mainfrom
fix/filter-dropdown-disabled-opens

Conversation

@tmccoy14

@tmccoy14 tmccoy14 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Filter Dropdown: Fixed the disabled state — the disabled prop was only applied to the inner Button, so the dropdown still opened on click/keyboard because Radix's DropdownMenuTrigger has its own open handlers. Passing disabled to the trigger now short-circuits those handlers so the menu won't open when disabled.
  • Section Heading: Changed the heading prop type from string to React.ReactNode so it can accept a badge alongside the heading text (used for issued credentials).

Changes

  • filter-dropdown.tsx — pass disabled to DropdownMenuTrigger in addition to the Button.
  • section-heading.tsx — widen heading prop type to React.ReactNode.

Testing

  • Verified a disabled FilterDropdown no longer opens via click or keyboard, while the enabled state is unchanged.
  • Verified SectionHeading accepts both plain text and a text + Badge combination.

@tmccoy14 tmccoy14 self-assigned this Jul 8, 2026
@tmccoy14 tmccoy14 merged commit 257c530 into main Jul 8, 2026
1 check passed
@tmccoy14 tmccoy14 deleted the fix/filter-dropdown-disabled-opens branch July 8, 2026 19:01
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.

1 participant