question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't control the filtering when using creatable / broken filtering

See original GitHub issue

I have a use case in which I want the following things:

  1. Fill the dropdown with predefined elements
  2. Make a fetch and pull some additional elements when the menu gets opened (emulated with a setTimeout and a Promise in my demo)
  3. Make it possible to create new elements by typing inside the dropdown without filtering the currently shown elements

“1” and “2” are easy to implement, but adding “3” to the mix seems impossible. As soon as I start typing, the “Create new” element shows up, and everything else is filtered.

Demo: https://codesandbox.io/s/react-select-v3-sandbox-forked-x3qy2?file=/example.js

It seems that this should be possible by using the filterOption={() => true} prop in order to avoid elements to get filtered / hidden, but in practice it doesn’t seem to be working.

Is this a bug or is this the expected behaviour?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
alexandernstcommented, Mar 29, 2021

@ebonow I’m getting back just to say that removing the Async component and managing the state myself completely worked out! Thank you once again!

1reaction
alexandernstcommented, Mar 27, 2021

Thank you for the reply! Let me give this approach a shot

Read more comments on GitHub >

github_iconTop Results From Across the Web

AsyncCreatable + filterOptions breaks create functionality #1547
The issue is only with AsyncCreatable . My filter is just removing options a user previously selected, but which react-select is no longer...
Read more >
Adding filter controls to analysis sheets - Amazon QuickSight
The filter control is added to the sheet, usually at the bottom. You can resize it or drag it to different positions on...
Read more >
Create, edit, and manage filters - Looker Studio Help
Add a filter to a chart or control Edit your report. ... Click edit Edit icon . You can also create, edit, and...
Read more >
Troubleshooting common filter suggestion issues | Looker
This prevents users from seeing a filter suggestion that they cannot access. ... Open the Network tab on your browser with the shortcut...
Read more >
Filtering with parameters - Tableau
Click OK once more to create the Filter based on the calculated ... Right click the Year parameter and select “Show Parameter Control”....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found