fix(calendar): close year picker when tapping the already-selected year#6386
Open
Gdhanush-13 wants to merge 2 commits intoheroui-inc:v3from
Open
fix(calendar): close year picker when tapping the already-selected year#6386Gdhanush-13 wants to merge 2 commits intoheroui-inc:v3from
Gdhanush-13 wants to merge 2 commits intoheroui-inc:v3from
Conversation
… Tabs The secondary variant styles used descendant selectors (e.g. .tabs--secondary .tabs__tab) which leaked into nested Tabs components with a different variant, because inner elements are still descendants of the outer .tabs--secondary. Fixed by scoping all secondary variant selectors through the direct child > .tabs__list-container, which correctly stops at the Tabs component boundary. Nested Tabs have their own .tabs__list-container that is NOT a direct child of the outer .tabs--secondary. Closes heroui-inc#6381
When the year picker is open and the user taps the currently selected year, the picker should close. Previously, calling setFocusedDate with the same year value could interfere with the setIsYearPickerOpen(false) call due to react-aria state processing. Fixed by skipping the setFocusedDate call when the selected year matches the focused year, and always calling setIsYearPickerOpen(false). Closes heroui-inc#6329
|
@Gdhanush-13 is attempting to deploy a commit to the HeroUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes #6329
Problem
When the year picker is open and the user taps the already-selected year, the picker stays open instead of closing.
Fix
Skip the redundant setFocusedDate call when the selected year already matches the focused year, and always call setIsYearPickerOpen(false). This ensures tapping the current year reliably closes the picker.