Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: The OperationNode will repeatedly change status between appearing and disappearing. #730

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

snowlocked
Copy link
Contributor

In my case,when I use the Tabs component of antd, I have found the OperationNode will repeatedly change status between appearing and disappearing when the tabs component's with is almost equal to the sum of the width of all tab items.
20240716164921_rec_

Then I found one of the parameters visibleTabContentValue of hook function useVisibleRange will repeatedly change. I just try to figure it out what happen.

At last, I've found that the needScroll value's judgemental condition maybe not correct.(the value of t+a is tabContentSizeValue + addSizeValue). We can find these two number is almost equal so that they are equal. And then the needScroll is false.
image

So I think the needScroll can be just only comparing the part of integer is enough.
image

BTW, I just only test my case without other complicated use. If there are other problems, welcome to point them out

Copy link

vercel bot commented Jul 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tabs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 9:34am

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.

2 participants