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

fix(components): [select-v2] label error when value not in the options #14656

Merged
merged 1 commit into from
Oct 28, 2023

Conversation

tolking
Copy link
Member

@tolking tolking commented Oct 25, 2023

closed #14621

before

after

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

🤖 Generated by Copilot at 3c7e44d

This pull request fixes a test case bug and improves the useSelect hook for the select-v2 component. It uses a helper function getValueKey to generate unique keys for each option based on its value and label.

Related Issue

Fixes #___.

Explanation of Changes

🤖 Generated by Copilot at 3c7e44d

  • Fix a bug in the single select test case that caused the placeholder to be '[object Object]' when the initial value was an object (link)
  • Refactor the useSelect hook to use a helper function getValueKey to generate unique keys for each option based on its value and label, instead of directly converting the model value to a string (link)

@github-actions
Copy link

github-actions bot commented Oct 25, 2023

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Oct 25, 2023
@github-actions
Copy link

🧪 Playground Preview: https://element-plus.run/?pr=14656
Please comment the example via this playground if needed.

@btea btea merged commit bb12dd5 into dev Oct 28, 2023
13 checks passed
@btea btea deleted the fix/select-v2-initvalue branch October 28, 2023 12:29
@element-bot element-bot mentioned this pull request Nov 3, 2023
3 tasks
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CommitMessage::Qualified Qualified commit message
Projects
None yet
2 participants