(
inputValue: string,
{ action, prevInputValue }: InputActionMeta
)
| 6 | const [menuIsOpen, setMenuIsOpen] = React.useState<boolean>(); |
| 7 | |
| 8 | const onInputChange = ( |
| 9 | inputValue: string, |
| 10 | { action, prevInputValue }: InputActionMeta |
| 11 | ) => { |
| 12 | if (action === 'input-change') return inputValue; |
| 13 | if (action === 'menu-close') { |
| 14 | if (prevInputValue) setMenuIsOpen(true); |
| 15 | else setMenuIsOpen(undefined); |
| 16 | } |
| 17 | return prevInputValue; |
| 18 | }; |
| 19 | |
| 20 | return ( |
| 21 | <Select |
no outgoing calls
no test coverage detected
searching dependent graphs…