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

[Form] 在form中使用picker,选择picker后应该显示对应数据的label而不是value #308

Open
1 task done
canvascat opened this issue Dec 12, 2024 · 1 comment

Comments

@canvascat
Copy link

canvascat commented Dec 12, 2024

Basic Info

What is expected?

选择picker后表单中显示的是对应数据value

Steps to reproduce

点击picker选择值

Extra info

通过自定义renderLinkedContainer来显示值的label,发现初始状态拿到的data是[], 导致拿不到对应的label
image

        renderLinkedContainer={(values, data) =>
              values
                .map(
                  (value) => data.find((item) => item.value === value)?.label
                )
                .join("-") || "empty"
            }
@ziqisia
Copy link
Collaborator

ziqisia commented Dec 12, 2024

你可以给Picker加上

mountOnEnter={false}
unmountOnExit={false}

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