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

chore: update select controlled example #749

Conversation

gparlakov
Copy link
Contributor

  • use id-s to remove the confusion of select being a value or an id of a value

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests
  • Other

Why is it needed?

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have ran pnpm change and documented my changes
  • I have add necessary docs (if needed)
  • Added new tests to cover the fix / functionality

- use id-s to remove the confusion of select being a value or an id of a value
Copy link

changeset-bot bot commented May 19, 2024

⚠️ No Changeset found

Latest commit: 52cda4b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

<Select.Label>Logged in users</Select.Label>
<Select.Trigger class="select-trigger">
<Select.DisplayText placeholder="Select an option" />
</Select.Trigger>
<Select.Popover class="select-popover">
<Select.Listbox class="select-listbox">
{users.map((user, index) => (
<Select.Item value={index.toString()} key={user}>
<Select.ItemLabel>{user}</Select.ItemLabel>
<Select.Item value={user.id} key={user.id}>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thejackshelton your suggestion to use user.charAt(0) bumped into 2 users starting with J issue.

Having id and name in an object provides an example for many use cases, maybe even the bulk of the use cases.

@thejackshelton
Copy link
Contributor

Awesome job! Yeah completely agree with a unique user id here.

LGTM, merging.

Side note: I'm wrapping up the new refactored accordion, but will get to the select this week.

@thejackshelton thejackshelton merged commit 35f122b into qwikifiers:main May 19, 2024
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants