react-autocomplete: fix renderMenu param type (#34183)

* Add failing test

* Fix failing test
This commit is contained in:
Oliver Joseph Ash
2019-03-29 21:27:46 -07:00
committed by Ron Buckton
parent 0f4522b7c8
commit d37eb74cea
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ declare namespace Autocomplete {
* and the width of the dropdown menu.
*/
renderMenu?: (
items: any[],
items: ReactNode[],
value: string,
styles: CSSProperties,
) => ReactNode;
@@ -16,3 +16,8 @@ render(
/>,
container,
);
// $ExpectError
const renderMenu: React.ComponentProps<typeof Autocomplete>['renderMenu'] = (
(item: string[]) => <div></div>
);