tabs icon indicating copy to clipboard operation
tabs copied to clipboard

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

Open snowlocked opened this issue 1 year ago • 1 comments

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

snowlocked avatar Jul 16 '24 09:07 snowlocked

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

vercel[bot] avatar Jul 16 '24 09:07 vercel[bot]