Replies: 1 comment
-
Hi @Y1a2s3h4, Did you try passing Example codesanbox: https://codesandbox.io/p/sandbox/react-select-examples-6picqk Code import Select from "react-select";
import type React from "react";
const HideIfNoOptions = ({ selectedOption, handleChange, options }) => {
return (
<>
<h2>Hide menu if no option</h2>
<Select
isMulti
value={selectedOption}
onChange={handleChange}
options={options}
noOptionsMessage={() => null}
/>
</>
);
};
export default HideIfNoOptions; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hide menu when no options found.
how can we implement this functionality without using
filterOptions
props ?Beta Was this translation helpful? Give feedback.
All reactions