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

docs(Autocomplete): update Autocomplete event typing #1969

Merged
merged 2 commits into from
Aug 29, 2023
Merged

docs(Autocomplete): update Autocomplete event typing #1969

merged 2 commits into from
Aug 29, 2023

Conversation

rakuzen25
Copy link
Contributor

Description

This PR updates the event type for the Autocomplete component from any to CustomEvent<AutocompleteOption>.

The problem, though, is that the user needs to manually cast the values as e.g. string, since value is unknown in AutocompleteOption. Should there be a generic type AutocompleteOption<T> to let the user define what values look like?

Changsets

Instructions: Changesets automate our changelog. If you modify files in /packages/skeleton, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

@vercel
Copy link

vercel bot commented Aug 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Aug 29, 2023 3:54pm

@changeset-bot
Copy link

changeset-bot bot commented Aug 29, 2023

⚠️ No Changeset found

Latest commit: e0e877f

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

@endigo9740
Copy link
Contributor

I'll let @AdrianGonz97 review this as he's a bit more Typescript savvy than myself. But looks good at a glance!

@endigo9740 endigo9740 requested review from endigo9740 and AdrianGonz97 and removed request for endigo9740 August 29, 2023 03:17
Copy link
Member

@AdrianGonz97 AdrianGonz97 left a comment

Choose a reason for hiding this comment

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

Looks great! Just needed to delete the changeset as we don't use them when we add changes to the docs site. Thanks!

@endigo9740
Copy link
Contributor

I see the changeset has been removed as requested, so I'll consider this complete and aim to merge now. Thanks for the help!

@endigo9740 endigo9740 merged commit 81348f6 into skeletonlabs:dev Aug 29, 2023
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.

3 participants