-
Notifications
You must be signed in to change notification settings - Fork 184
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
[Feature]: Make custom filter-function for CommandDialog Component #284
base: dev
Are you sure you want to change the base?
[Feature]: Make custom filter-function for CommandDialog Component #284
Conversation
I'm on it, will explain after commit |
Thanks! |
When you have create demos you have two options
|
Great, thanks for explanation! ❤️ Need some help with this issue, because it contains many issues inside 😁 Now I added custom
So one bug that need to be fixed now, dynamic change of I will try to fix this, need some help / time 🙂 |
No need to rush 👍 There is also the same pkg for Vue called vue-command-palette which uses |
@zernonia can we remove these aggressive warnings for a11y? Other shadcns seem not to have these logs Also, there is something wrong with |
Will this be merged? This is how I'm solving it in CommandDialog for now
|
</script> | ||
|
||
<template> | ||
<Dialog v-bind="forwarded"> | ||
<DialogContent class="overflow-hidden p-0 shadow-lg"> | ||
<Command class="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"> | ||
<Command :filter-function="props.filterFunction" class="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romanhrynevych can you check this line, it has TypeScript error
if it can help, for me when I do Algolia search I do the following:
so each time I type, I let Algolia do the "filtering" in the backend and return the result, and I display them "without filtering" (from CommandDialog) so that the users sees exactly the results of algolia |
Main reason of this PR is to close this issue #158 , but think that it will be helpful to add new Demo with
@vueuse/useFuse
filteringHave some errors with creating new Demo, @sadeghbarati need help from you because previously I never worked with this type of projects 🙂
Link to Demo:
www/src/lib/registry/default/example/CommandDialogUseFuseDemo.vue
Styling and other will fixed later, need to understand how to add a new Demo code 😁