diff --git a/types/react-select/index.d.ts b/types/react-select/index.d.ts index abfed81047..877b2557a0 100644 --- a/types/react-select/index.d.ts +++ b/types/react-select/index.d.ts @@ -284,7 +284,7 @@ declare namespace ReactSelectClass { * placeholder displayed when there are no matching search results or a falsy value to hide it * @default "No results found" */ - noResultsText?: string; + noResultsText?: string | JSX.Element; /** * onBlur handler: function (event) {} */ @@ -494,7 +494,7 @@ declare namespace ReactSelectClass { /** * placeholder displayed when there are no matching search results (shared with Select) */ - noResultsText?: string; + noResultsText?: string | JSX.Element; /** * field placeholder; displayed when there's no value (shared with Select) */ diff --git a/types/react-select/react-select-tests.tsx b/types/react-select/react-select-tests.tsx index 13d64d32ce..8b834d1bb6 100644 --- a/types/react-select/react-select-tests.tsx +++ b/types/react-select/react-select-tests.tsx @@ -171,4 +171,12 @@ describe("Examples", () => { valueRenderer={props => null} />; }); + + it("No Results renderer with string", () => { + ; + }); + + it("No Results renderer with element", () => { + no results} />; + }); });