-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Ellipsis] 当 Ellipsis 处于 forceRender 的 tab 中,tab 第一次变为可见时,Ellipsis 会闪烁 #6063
Comments
与 import React, { useState } from "react";
import { Ellipsis } from "antd-mobile";
const content = `图表中空间有限,文本内容无法完全显示图表中空间有限,
文本内容无法完全显示图表中空间有限,文本内容无法完全显示图表中空间有限,
文本内容无法完全显示图表中空间有限,文本内容无法完全显示图表中空间有限,
文本内容无法完全显示图表中空间有限,文本内容无法完全显示图表中空间有限,
文本内容无法完全显示`;
export default function App() {
const [state, setState] = useState(false);
return (
<div className="App">
<Ellipsis
content={content}
style={{ display: state ? "block" : "none" }}
/>
<button onClick={() => setState(true)}>点击</button>
</div>
);
} |
#6155 这个 pr 说是解决了这个问题, 我看已经发布了新版本了。但是经过验证, |
好吧 当初盯着 display 案例修,没注意到这个 forceRender , |
应该是加上 padding 后,容器计算问题 |
Version of antd-mobile
5.28.1
Operating system and its version
Others
Browser and its version
chorme 111
Sandbox to reproduce
https://codesandbox.io/s/nifty-moore-451y9s?file=/src/App.tsx
What happened?
当 Ellipsis 处于 forceRender 的 tab 中,tab 第一次变为可见时,Ellipsis 会闪烁(没隐藏超出部分 -> 隐藏超出部分)
期望:tab 第一次变为可见时,Ellipsis 正常展示(正常隐藏超出的部分),不发生闪烁。
Relevant log output
No response
The text was updated successfully, but these errors were encountered: