diff --git a/packages/web/src/components/PowerInput/Suggestions.tsx b/packages/web/src/components/PowerInput/Suggestions.tsx index 451344ef..7f3c87e0 100644 --- a/packages/web/src/components/PowerInput/Suggestions.tsx +++ b/packages/web/src/components/PowerInput/Suggestions.tsx @@ -38,10 +38,10 @@ const Suggestions = (props: SuggestionsProps) => { onSuggestionClick = () => null, } = props; const [current, setCurrent] = React.useState(0); - const [listLength, setListLength] = React.useState(SHORT_LIST_LENGTH); + const [listLength, setListLength] = React.useState(SHORT_LIST_LENGTH); const expandList = () => { - setListLength(undefined); + setListLength(Infinity); }; const collapseList = () => { @@ -72,7 +72,7 @@ const Suggestions = (props: SuggestionsProps) => { primary={option.name} /> - {option.output?.length && ( + {!!option.output?.length && ( current === index ? : )} @@ -105,7 +105,7 @@ const Suggestions = (props: SuggestionsProps) => { } - {listLength && ( + {option.output?.length > listLength && (