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

Disable the automatic filtering in whitelist #1114

Closed
paourissi opened this issue Sep 3, 2022 · 3 comments
Closed

Disable the automatic filtering in whitelist #1114

paourissi opened this issue Sep 3, 2022 · 3 comments
Labels

Comments

@paourissi
Copy link

paourissi commented Sep 3, 2022

As you can see in the mix-mode demo https://codesandbox.io/s/tagify-react-wrapper-forked-2ifhwp

When typing @ and start writing, the list will automatically be filtered with what iam typing. When using api requests the filtering is handled by the service itself and just returns the filtered data based on what we typed after the @. So as you can see there is no need for the dropdown to be filtered further.

Is there a way to disable the automatic filtering in the dropdown in react?

@yairEO
Copy link
Owner

yairEO commented Sep 3, 2022

You can replace the prototype method which does the filtering with your own:

tagify.dropdown.filterListItems = () => tagifyRef.current.whitelist

@yairEO yairEO closed this as completed Sep 3, 2022
@yairEO yairEO added the Question label Sep 3, 2022
@paourissi
Copy link
Author

And how do you do that when using react?

@yairEO
Copy link
Owner

yairEO commented Sep 4, 2022

This is how you can do it in React.:

https://codesandbox.io/s/tagify-1114-disable-the-automatic-filtering-in-whitelist-6ekx7w?file=/src/index.js:982-1042

I think its better I will add some option to disable it, for an easier way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants