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

Picker组件onOk函数回调没有返回默认值 #168

Open
1 task
rockey2020 opened this issue Sep 11, 2023 · 5 comments
Open
1 task

Picker组件onOk函数回调没有返回默认值 #168

rockey2020 opened this issue Sep 11, 2023 · 5 comments

Comments

@rockey2020
Copy link

Basic Info

Steps to reproduce

<Picker
visible={penisPickerVisible}
cascade={false}
data={[PenisOption]}
maskClosable={true}
onHide={() => {
setPenisPickerVisible(false);
}}
value={value ? [value] : []}
onOk={(item) => {
console.log(item);
setValue(item[0] as number);
}}
/>

value为undefined的时候,显示picker,点击ok按钮,如果我没有上下滑动选择任何的item,这个时候onOk返回的是一个空数组,这里不应该是默认返回第一个item吗

@rockey2020
Copy link
Author

image image

@TinaPeach
Copy link
Collaborator

同学,该问题已复现,本周修复发版

@TinaPeach
Copy link
Collaborator

@arco-design/[email protected]已发版修复

@rockey2020
Copy link
Author

@TinaPeach 我这里测试看到还是返回了空数组

@rockey2020 rockey2020 reopened this Sep 15, 2023
@TinaPeach
Copy link
Collaborator

@rockey2020 给下复现的地址或用法?我用上面的case是ok的。

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

No branches or pull requests

2 participants