fix: 修复ProFormSelect/LightSelect选中之后没有自动隐藏和fieldProps使用open属性不能效两个问题 #8035
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.
此次PR修复了两个问题:
1、ProFormSelect选中某一项之后,下拉框没有自动消失。其实源码中有此逻辑,只不过没有生效,是因为下拉框选中自动消失的逻辑受到了其他代码的影响。我已经在此分支里加了相应的注释,并进行了修复。
2、在使用ProFormSelect组件时,在fieldProps中使用open属性,不生效。但是按照ProComponents官方文档的描述,fieldProps应该与antd中Select组件的props相同。导致源码逻辑与ProComponents官方文档的描述不一致。