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.

noOptionsMessage Props not working

See original GitHub issue

The props noOptionsMessage not working, my implemention.

would it be a problem in the component or in my implementation? My version “react-select”: “^1.3.0”,

<Select value={this.props.value} onChange={this.onChange.bind(this)} options={this.state.options} searchable={this.props.searchable} onKeyDown={this.handleKeyDown.bind(this)} placeholder={this.props.label} clearable={this.props.clearable} noOptionsMessage={"Test"} />

or

<Select value={this.props.value} onChange={this.onChange.bind(this)} options={this.state.options} searchable={this.props.searchable} onKeyDown={this.handleKeyDown.bind(this)} placeholder={this.props.label} clearable={this.props.clearable} noOptionsMessage={() => return "Test"} />

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

51reactions
andrea-ligioscommented, Jul 22, 2019

Now it’s:

noOptionsMessage={() => "No values available"}
10reactions
acapusteanindrivocommented, Oct 26, 2020

noOptionsMessage={“No options”}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Properly use NoOptionsMessage in react-select to change the ...
The problem is that the text is not styled anymore. Is it possible to change the text but keep the default style? If...
Read more >
Properly use NoOptionsMessage in react-select to change the ...
You can pass a style object to styles prop or create a new custom component. Following code shows both approaches. import React from...
Read more >
API - React Select
A flexible and beautiful Select Input control for ReactJS with multiselect, autocomplete and ajax support.
Read more >
React-select v2 NoOptionsMessage - CodeSandbox
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >
react-select - npm
Start using react-select in your project by running `npm i react-select`. ... Controllable state props and modular architecture ...
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