[v2] [help wanted] FilterOptions prevent create action CreatableSelect
See original GitHub issueUse case
I have tried to add a filterOption
props on a CreatableSelect
the result is the filterOption
works but I have lost the Create ...
option in the select dropdown.
The filter options are pretty standard:
const filterOptions = createFilter({
ignoreCase: true,
ignoreAccents: true,
matchFrom: 'start'
})
Live example
https://codesandbox.io/s/j3834v8o3
Result previews
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Advanced - React Select
React-Select exports a createFilter function that returns a filterOption method. ... is creatable, you would also likey want to include the "Create" option....
Read more >How do I create new option if there are no left while searching ...
You can achieve your goal using filterOption function like the following code: class App extends React.Component { constructor(props) ...
Read more >React Select Advanced Options - Medium
We can create a dropdown with creatable choices by using the CreatableSelect component. For instance, we can write:
Read more >react-select/CHANGELOG.md - UNPKG
17, - Remove base entrypoint to fix rollup dependency resolution issue ... 160, - async select now accepts a filterOptions function as a...
Read more >React Autocomplete component - Material UI - MUI
The value created by typing into the textbox is always a string, regardless of the type of the ... selectOnFocus to help the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lbelavoir It looks like your import seems a bit off.
Try changing your import from:
import CreateSelectable from "react-select";
for V3 use:
import Createable from "react-select/creatable";
https://codesandbox.io/s/react-select-creatable-filteroptions-v311-092x3?file=/src/App.jsor for V2 use:
import { Createable } from "react-select";
https://codesandbox.io/s/react-select-creatable-filteroptions-v244-t58w7?file=/src/App.jsThat should hopefully be working for you better.
@ebonow It works now, Thanks!