-
-
Notifications
You must be signed in to change notification settings - Fork 50.5k
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
feat: Tree/TreeSelect/Select support virtual
prop to disable virtual scroll
#21955
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit f578c56:
|
Codecov Report
@@ Coverage Diff @@
## feature #21955 +/- ##
========================================
Coverage 97.97% 97.97%
========================================
Files 305 305
Lines 7046 7046
Branches 1947 1902 -45
========================================
Hits 6903 6903
Misses 143 143 Continue to review full report at Codecov.
|
回头到 master 里看看怎么省 Bundle size。 |
bundle size 超了? |
对,关闭的 virtual 的功能让 gzip 多了 0.26 KB。 |
这不科学,master 是 296kb。 |
feature branch 还有其他的更新,这三个组件是最后的稻草 😄 |
feature 分支上 rc-visual-list 版本没升。 |
select默认virtual的情况下,但选择列表数量较多(来自后端接口)的时候,编辑状态下,就是select在Form(也是antd 组件)里并且field被赋值后,点击select弹出的选择列表有一定概率是空白,显示不了选择项,滑动鼠标滚轮恢复。 |
@YufeeXing 给个重现看看? |
可以参考附件的git,一次点开select就是空白,滚动鼠标可以恢复。antd版本4.2.5。
<Form.Item name="city" rules={[{ required: true, message: '必填' }]}>
<Select
placeholder="请选择城市"
showSearch
filterOption={(input, option) =>
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
{citylist.map(item => (
<Select.Option value={item.id} key={item.id}>
{item.cName}
</Select.Option>
))}
</Select>
</Form.Item>
… 在 2020年11月10日,下午10:15,二货机器人 ***@***.***> 写道:
@YufeeXing <https://github.com/YufeeXing> 给个重现看看?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#21955 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKFWRZTXHDSCSMDX2Q2FXNLSPFDHTANCNFSM4LDEUJZQ>.
|
@YufeeXing 能给个 codesandbox 吗? https://codesandbox.io/ |
Sorry, 我在codesandbox中测试单个Select,并没有能够复现问题,整个页面的话,涉及其他问题,没办法在codesandbox中分享。我这边在观察下,如果有发现,再联系你。谢谢了。
… 在 2020年11月18日,上午11:21,二货机器人 ***@***.***> 写道:
@YufeeXing <https://github.com/YufeeXing> 能给个 codesandbox 吗? https://codesandbox.io/ <https://codesandbox.io/>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#21955 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKFWRZTBBTMG5RGSJX75JWTSQM4UFANCNFSM4LDEUJZQ>.
|
🤔 This is a ...
🔗 Related issue link
resolve #21722
💡 Background and solution
📝 Changelog
virtual
prop to disable virtual scrollvirtual
属性以关闭虚拟滚动。☑️ Self Check before Merge
View rendered components/select/index.en-US.md
View rendered components/select/index.zh-CN.md
View rendered components/tree-select/index.en-US.md
View rendered components/tree-select/index.zh-CN.md
View rendered components/tree/index.en-US.md
View rendered components/tree/index.zh-CN.md