Skip to content

fix(Select): select value flash when selected item#2239

Open
Hwacc wants to merge 6 commits intounovue:v2from
Hwacc:fix-select-flash
Open

fix(Select): select value flash when selected item#2239
Hwacc wants to merge 6 commits intounovue:v2from
Hwacc:fix-select-flash

Conversation

@Hwacc
Copy link
Copy Markdown

@Hwacc Hwacc commented Oct 22, 2025

📝 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:

  1. When we use setTimeout, the whole flow:
bug1
  1. The original flow likes:
origin1

✅ Solutions

Very easy: we fully leverage the <Presence> component’s features to control the switching of child components.
but we need tag <Presence> as force-mount to keep it alive, becasue we focus in its child components, don’t want it to be destroyed immediately when closing.

In addition, we use force-mount in <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 usual

Form.default._.Reka.UI.-.Google.Chrome.2025-10-22.17-03-58.mp4

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Oct 22, 2025

Open in StackBlitz

npm i https://pkg.pr.new/reka-ui@2239

commit: c76220d

@RitvikSardana
Copy link
Copy Markdown

RitvikSardana commented Dec 18, 2025

Please merge this ASAP.

This bug is very irritating

@jpmsantana
Copy link
Copy Markdown

@Hwacc what do we need to merge this? this bug irritates the users who use the pages that are consuming this component.

@RitvikSardana
Copy link
Copy Markdown

Why is no one updating this PR?

Could anyone please work on it?

@Hwacc
Copy link
Copy Markdown
Author

Hwacc commented Jan 8, 2026

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.

@kricsleo
Copy link
Copy Markdown
Collaborator

Sorry for the late response. I normally don't merge PRs 🙏, so I'll leave it to the author, zernonia.

@ragingdave
Copy link
Copy Markdown

I think @kricsleo meant to tag @zernonia and not just link to him here. (Also I'm doing it to highlight the fix as well).

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.

[Bug]: Select text flickers with the placeholder on change

5 participants