Wizard: Fix 'too short' state in Packages step

Currently, when a search term is entered and then reduced to a single
character in the Wizard's packages step, the previous results are still
shown.
What is expected is that the empty state hinting at the search term
being too short would be shown.

The condition in bodyContent was wrong, because it assumed that the list
of results would be 0 when in fact it wasn't being cleared.

Fixes #3139
This commit is contained in:
Simon Steinbeiss 2025-04-24 14:01:45 +02:00 committed by Klara Simickova
parent 3e2e57d545
commit a1c32f90bb

View file

@ -1166,10 +1166,7 @@ const Packages = () => {
const bodyContent = useMemo(() => {
switch (true) {
case debouncedSearchTermLengthOf1 &&
!debouncedSearchTermIsGroup &&
transformedPackages.length === 0 &&
transformedGroups.length === 0:
case debouncedSearchTermLengthOf1 && !debouncedSearchTermIsGroup:
return TooShort();
case (toggleSelected === 'toggle-selected' &&
packages.length === 0 &&