This repository was archived by the owner on Apr 7, 2024. It is now read-only.
fix:开启虚拟滚动,中间区域可显示的列由于列宽过长被计算成虚拟列,没有正确显示#309
Open
wqhui wants to merge 1 commit intoalibaba:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在虚拟滚动中,计算横向可展示内容的函数
getHorizontalRenderRange中,会根据当前的列宽判断是否显示:ali-react-table/packages/ali-react-table/src/base-table/calculations.tsx
Lines 117 to 126 in 847cc65
但是在当前列宽过长时,也就是

当前的列宽>表格剩余可显示宽度,这里的判断会直接将这列并入虚拟列,导致表格应该展示的列没有展示出来:这里将其修改为表格上次计算存在剩余宽度,则当前列就应该显示
bug复现示例:https://codesandbox.io/s/xu-ni-lie-qing-kuang-xia-shou-lie-kuan-du-guo-chang-wu-nei-rong-zhan-shi-17ucgx