-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Custom keywords in filter #146
Comments
You can already do this <Command.Item value="delete trash">Remove item</Command.Item>
<Command.Item value="add new">Create item</Command.Item> |
@joaom00 While it seems to work, it feels wrong to assign this to So in our case, we'd like to use a different prop for filtering if possible (hence the I proposed it here since it feels like it could be a common use case (I might be wrong though). |
I also think the const categories = [1,2,3];
...
const { t } = useTranslation();
const searchValues = getTranslationById(t, props.value);
<MultiSelectItemWrapper
{...props}
value={`${props.value} ${searchValue}`}
onSelect={() => toggleValue(props.value)}
> |
I'm in favor of adding the |
I think it will be confusing to have two props that do almost the same thing. Or would it be worth making the |
@pacocoursey @honzatmn I opened a PR adding this prop #158 |
Hey, thanks for a great library, it is such a time saver for us.
We'd like to filter also by synonyms (and additional keywords), not just by a value. One way to solve this would be to completely take over the filtering and write our own filter function, but I imagine that this could be something useful also to others (e.g. showing "Remove" item when "delete" or "trash" words are searched.
I'd imagine some additional property
keywords: string[]
onCommand.Item
and the search would take those into consideration too.Thanks for consideration and all your great work on cmdk library.
The text was updated successfully, but these errors were encountered: