mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
noResultsText can be React Component
This commit is contained in:
Vendored
+2
-2
@@ -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)
|
||||
*/
|
||||
|
||||
@@ -171,4 +171,12 @@ describe("Examples", () => {
|
||||
valueRenderer={props => null}
|
||||
/>;
|
||||
});
|
||||
|
||||
it("No Results renderer with string", () => {
|
||||
<ReactSelect noResultsText="no results" />;
|
||||
});
|
||||
|
||||
it("No Results renderer with element", () => {
|
||||
<ReactSelect noResultsText={<i>no results</i>} />;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user