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

feat/autocomplete-custom-filter-function #2208

Conversation

Mahmoud-zino
Copy link
Contributor

Linked Issue

Closes #1966

Description

Added prop filterFunction with default value of the Skeleton's original filter function.

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)

Copy link

changeset-bot bot commented Nov 1, 2023

🦋 Changeset detected

Latest commit: 467134e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton Minor

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Nov 1, 2023

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

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Nov 8, 2023 0:09am

@endigo9740
Copy link
Contributor

endigo9740 commented Nov 5, 2023

@Mahmoud-zino a couple things on this:

  1. Go ahead and rename the prop filter (one word). We should aim to keep props as slim as possible.
  2. I'm not sure I understand what the sentence in the example is referring to - highlighted here:

This example uses a custom filter to filter options after value only.

Screenshot 2023-11-05 at 10 43 36 AM

The other examples just show the filtered results - maybe we just go ahead and follow that pattern here? That or just remove this line. I think what's present works fine.

If you can make these couple changes then this should be good to merge.

@endigo9740 endigo9740 marked this pull request as draft November 5, 2023 16:48
@Mahmoud-zino
Copy link
Contributor Author

Mahmoud-zino commented Nov 5, 2023

@endigo9740
the line was intended to convey that the filter is different from the standard one. The standard filter applies after value, label, or keyword filtering while the modified one filters only after value. However, I recognize that it might be more confusing than helpful for users to understand its meaning, so I will remove it

@endigo9740
Copy link
Contributor

@Mahmoud-zino looks good. Be sure to flip to "ready to review" when you're done.

@Mahmoud-zino Mahmoud-zino marked this pull request as ready for review November 5, 2023 17:11
@endigo9740 endigo9740 merged commit 0680799 into skeletonlabs:dev Nov 8, 2023
3 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.

Allow custom search solution for autocomplete component
2 participants