ali-react-table
ali-react-table copied to clipboard
Performent, flexible and modern React table component.
比如暴露一下excel sheet标题编辑,和行列宽高编辑的入口
在升级到react18以后,开启虚拟滚动后,滚动会先白屏再正常。 推测可能是先显示了滚动位置的样式再渲染导致
开启虚模式,当表格渲染完毕后,竖直滚动到中间部分,此时将表格的父容器设置为`display:none`,然后在设置回`display:block`,可复现问题。 排查了一下,发现是`updateRowHeightManager`中在`display:none`时记录了空白的行高(代码块中616行)。 https://github.com/alibaba/ali-react-table/blob/847cc650b5e0e30e6ea05cf3d30cd5fc5be4515a/packages/ali-react-table/src/base-table/table.tsx#L598-L617 因为`display:none`会导致表格的宽高变成0,此时也会进行重渲染,渲染又会去计算要渲染的区域,因为上面的步骤有空白的行高,导致这里滚动条发生变化,等再次设为`display:block`时滚动条就会发生跳动了... https://github.com/alibaba/ali-react-table/blob/847cc650b5e0e30e6ea05cf3d30cd5fc5be4515a/packages/ali-react-table/src/base-table/table.tsx#L408-L409 想请教下,在`updateRowHeightManager`中发生行存在0高度时是否可以不记住此时的高度?我修改成这样可以解决问题。还是说当表格不可见时,`updateRowHeightManager`就不应该执行?还望赐教。
临时方案:开启【虚拟滚动】后,滚动条【下拉底部】加载全量数据,CTRL+F才能全局搜索。 问题:开启虚拟滚动,又想要在页面头部进行全局搜索,有什么好的方案吗 @shinima
在react18版本,使用BaseTable, 用createRoot方式渲染,App被严格模式包裹时,会导致组件无法正确渲染 ``` import ReactDOM from "react-dom/client"; const root = ReactDOM.createRoot( document.getElementById("root") as HTMLElement ); root.render( ); ``` 由于react18在严格模式下,对于类组件会先调用一次 componentWillUnmount, 导致rootSubscription被取消订阅 
请问这个还维护嘛
坐等大佬维护
辛苦作者更新到react18
 应该是react版本问题: ``` "ali-react-table": "^2.6.1", "antd": "^5.11.1", "classnames": "^2.3.2", "lodash": "^4.17.21", "next": "13.5.6", "react": "^18", "react-dom": "^18", ```
npm install ali-react-table 安装提示: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react...