Skip to content

fix: dropdown check icon should follow selected item - #1305

Merged
tannerlinsley merged 2 commits into
TanStack:mainfrom
6TELOIV:patch-1
Nov 4, 2026
Merged

tannerlinsley merged 2 commits into
TanStack:mainfrom
6TELOIV:patch-1

Conversation

@6TELOIV

@6TELOIV 6TELOIV commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

fixes #1304

Summary by CodeRabbit

  • Style
    • Dropdown items now use relative positioning by default. This can affect the placement of content positioned in relation to an item; other dropdown item styling is unchanged.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3a9cf921-8af2-4d55-b9f7-ac6b6d4c5244
Commits

Reviewing files that changed from the base of the PR and between 4668510 and e11ecde.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

DropdownItem now includes the relative positioning utility in its default Tailwind classes.

Changes: Dropdown positioning

Layer / File(s) Summary
Dropdown item positioning
src/components/Dropdown.tsx
DropdownItem adds relative to its default class list. Its other default classes are unchanged.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · previous review 46685

The dropdown checkmark is now anchored to its item, and the inspected uses show no material merge risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: fixing the dropdown check icon positioning so it follows the selected item. It matches the stated objective and the code change.
Linked Issues check ✅ Passed Issue #1304 requires relative positioning on the parent DropdownItem. The pull request adds relative to the default Tailwind classes in src/components/Dropdown.tsx. The change keeps the checkm…
Out of Scope Changes check ✅ Passed The pull request changes only the DropdownItem classes in src/components/Dropdown.tsx. The change directly addresses issue #1304 and contains no demonstrated unrelated implementation.
Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 640ad715-98d6-473f-902a-f4bb2fc35053

📥 Commits

Reviewing files that changed from the base of the PR and between 3819b85 and 4668510.

📒 Files selected for processing (1)
  • src/components/Dropdown.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@tannerlinsley

Copy link
Copy Markdown
Member

Verified the scrolling bug with the real Select and Dropdown components in a local browser fixture: 30 options, option 15 selected, and the menu scrolled to the end.

Before this change, scrolling 654px moved the selected row from y=565 to y=-89, but its check stayed at y=573. With this PR's relative class, the check moved to y=-81 and kept its 8px offset inside the selected row. That confirms the positioning fix addresses the overflow case in #1304.

This was an isolated component check, not a full site test run. The current head, 4668510, still has no application CI results, so I'm leaving it open for that verification.

@changeset-bot

changeset-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e11ecde

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tannerlinsley
tannerlinsley merged commit 78e6ff0 into TanStack:main Nov 4, 2026
7 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.

Checkbox in dropdown doesn't scroll with items

2 participants