fix(Select): select value flash when selected item#2239
Open
fix(Select): select value flash when selected item#2239
Conversation
commit: |
|
Please merge this ASAP. This bug is very irritating |
|
@Hwacc what do we need to merge this? this bug irritates the users who use the pages that are consuming this component. |
|
Why is no one updating this PR? Could anyone please work on it? |
Author
|
I’ve resolved the merge conflicts in v2.7.0 and looking forward to review. It looks like quite a few people have run into issues with this Select component. @kricsleo , do we have plans to merge this PR into the next release? Thanks. |
Collaborator
|
Sorry for the late response. I normally don't merge PRs 🙏, so I'll leave it to the author, zernonia. |
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.
📝 Summary
Fix Select component flickering issue
🔗 Related Issues
resolves #2160
🧪 How it was caused
It needs to be traced back to this PR #1916
Using setTimeout to delay and control the rendering flow is a bad solution for handling animation.
The analysis of the causes of the flickering is as follows:
✅ Solutions
Very easy: we fully leverage the
<Presence>component’s features to control the switching of child components.but we need tag
<Presence>asforce-mountto keep it alive, becasue we focus in its child components, don’t want it to be destroyed immediately when closing.In addition, we useforce-mountin<Presence>, so,SelectContentProps's forceMount prop was no longer works. Should we consider removing it?📸 Screenshots
Now, we can use
data-[state=close]to control our close animate as usualForm.default._.Reka.UI.-.Google.Chrome.2025-10-22.17-03-58.mp4