Disabling NoOptionsMessage
See original GitHub issueCurrently it doesn’t seem as though there’s a way to disable the “NoOptions” message entirely. You can set it to a different text, or style it with a custom component, but you cannot set it to null and remove the component, like you can with ie. IndicatorSeparator
. Setting NoOptionsMessage
component to null
results in a rendering error and setting it to () => null
results in a blank rounded box as shown here: https://codesandbox.io/s/react-codesandboxer-example-0exfd
Would be nice to be able to disable the message entirely, ie. by setting the component to null.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
react-select How to hide dropdown menu programmatically ...
In V2 you can achieve this by setting noOptionsMessage to a function that returns ... Turn off <Menu /> component to hide dropdown...
Read more >API - React Select
isOptionDisabled. Override the built-in logic to detect whether an option is disabled. An example can be found in the Replacing builtins documentation.
Read more >Optimize your react-select component to smoothly render ...
Disable onMouseMove and onMouseOver events ... we know that it is trying to render the “noOptionsMessage” if no options are available.
Read more >svelte-select - npm
Hide list and don't show noOptionsMessage when there are no items . containerClasses: String Default: '' . ... Disable select.
Read more >Is there "disabled" attribute for grafana ui components
Hi, I am using <Segment/> from @grafana/ui.I would like to know is there a way to make this component disabled based on 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
There is a way to fix this: use the
noOptionsMessage
top-level prop (not the same as thecomponents
object prop value) and set it to() => null
https://codesandbox.io/embed/react-codesandboxer-example-egds8
It gives me an ‘No options’ message even before API call is made 😦 . Would love to have an option to hide this mesage