fix(rn): update Picker component and implement tests#2542
Open
wangshunnn wants to merge 13 commits into
Open
Conversation
…d add test for default behavior
…ts for range updates
Collaborator
|
和其他基础组件拉齐处理backgroundStyle以及hasPositionFixed 测试确认innerProps是否需要传如picker content中 |
Collaborator
|
showPicker 里会先 renderPickerContent() 再立刻 updatePickerContent(),首次打开等于 open 后又 update 一次同样内容。功能没坏,但有点多余。可以改成:已 open 时只 update,未 open 时 open。 |
Collaborator
Author
已修复 |
Collaborator
Author
已修复 |
hiyuki
reviewed
Jul 8, 2026
| const openPickerContent = () => { | ||
| const renderPickerModal = getPickerContent() | ||
| if (!renderPickerModal) { | ||
| return false |
hiyuki
reviewed
Jul 8, 2026
| if (!renderPickerModal) { | ||
| return | ||
| } | ||
| const contentHeight = headerText ? 350 : 310 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix (Picker)
修复 RN
picker的range未正常透传导致的内容空白问题(原因:之前 fix: 过滤小程序属性,避免直接透传给rn组件 #2507 错误删除了 range 属性)。支持
picker动态更新选项数据,在外部range变化后再次打开弹层时,会刷新弹层内容,避免展示旧数据。补齐 RN
picker触发区域文本样式透传能力,使color、fontSize等样式能作用到子节点,表现更接近小程序。