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.

Creatable includes promptText in the onChange payload

See original GitHub issue

We 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:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
banunicommented, Aug 6, 2017

note that you’ll probably want to respond to keyCode === 9 to handle Tab keys

1reaction
purplesquirrelscommented, Mar 31, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

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