Skip to content
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

[Bug Report] AreaPicker组件配合popup组件联动问题 #886

Open
zzzhangy opened this issue Jan 22, 2025 · 0 comments
Open

[Bug Report] AreaPicker组件配合popup组件联动问题 #886

zzzhangy opened this issue Jan 22, 2025 · 0 comments

Comments

@zzzhangy
Copy link

问题出在哪个包

@taroify/core

问题出在哪个平台/设备/浏览器

微信小程序

平台/设备/浏览器

微信开发者工具

你正在使用的 Taroify 版本是多少

3.6.28

描述一下您遇到的问题以及重现步骤

AreaPicker组件配合popup组件在滑动选择地区未结束时点击确定关闭opoup组件后未拿到滑动后的值,但是当再次打开popup组件后AreaPicker组件默认展示的是滑动后的地区值,希望确定后如果未得到滑动后的最新值就还是滑动前的状态, 未使用 value受控模式,未跑通不知道是否也有问题 <Popup open={isOpen} onClose={() => setIsOpen(false)} placement="bottom" style={{ height: '40%' }}>
<AreaPicker
areaList={areaList}
defaultValue={["110000", "110100", "110101"]}
onConfirm={(values) => {
const provinceLabel = areaList.province_list[values[0]]
const cityLabel = areaList.city_list[values[1]]
const countyLabel = areaList.county_list[values[2]]
setAddressList([provinceLabel, cityLabel, countyLabel])
setIsOpen(false)
}}
onCancel={() => setIsOpen(false)}
/>

如果可能的话,请包含一个代码框的链接与复制的问题

你知道如何解决这个问题吗

None

您是否愿意参与修复这个问题,并创建一个 PR

None

修复这个问题的解决方案

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant