Creatable includes promptText in the onChange payload
See original GitHub issueWe are using v1.0.0-rc2
while using Creatable
, the onChange payload includes the promptText
in the payload.value attribute .
import React from 'react';
import { Creatable } from 'react-select';
class Demo extends React.Component {
render() {
return (
<Creatable onChange={(payload) => console.log(payload.value)} />
);
}
}
value turns out to be the full Create option "${label}"
instead of just label
We are passing promptTextCreator={(name) => name}
to by pass the issue
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:10 (1 by maintainers)
Top Results From Across the Web
View Implementations | Apple Developer Documentation
Create an Accessibility Rotor with the specified user-visible label and entries for each of the specified ranges. The Rotor will be attached to...
Read more >Cisco DNA Center Administrator Guide, Release 2.3.3
Create a role that has write permission to the Machine Reasoning ... In the Prompt Text field, enter the text in Regular Expression...
Read more >All other San Diego fixes - Product Documentation | ServiceNow
When creating an incident using the Create incident UI action on the interaction table in Agent Workspace, the URL has all parameters of...
Read more >View Raw - UNPKG
Stores sort information for a set of SortableProperties, including which ... the boolean state as the `aria-pressed` property to create a toggle button....
Read more >Oracle® SQLcl - User's Guide
of derivative works, and/or adaptation of i) Oracle programs (including any ... including any Modifications that You create or to which You contribute, ......
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
note that you’ll probably want to respond to keyCode === 9 to handle Tab keys
I just ran into this issue and I am using 1.0.0-rc3, however the solution from @roderickhsiao seems to fix the problem. I was not using
shouldKeyDownEventCreateNewOption
previously.