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

* Add failing test

* Fix failing test
This commit is contained in:
Oliver Joseph Ash 2019-03-30 04:27:46 +00:00 committed by Ron Buckton
parent 0f4522b7c8
commit d37eb74cea
2 changed files with 6 additions and 1 deletions

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;

View File

@ -16,3 +16,8 @@ render(
/>,
container,
);
// $ExpectError
const renderMenu: React.ComponentProps<typeof Autocomplete>['renderMenu'] = (
(item: string[]) => <div></div>
);