Add available filters check back

Signed-off-by: Sarah Medeiros <smedeiros@wayfair.com>
This commit is contained in:
Sarah Medeiros
2022-12-07 14:25:01 -05:00
parent c773242555
commit 50aa75ed80
2 changed files with 8 additions and 0 deletions
@@ -95,6 +95,10 @@ export const EntityLifecyclePicker = () => {
}
}, [queryParamLifecycles, availableLifecycles]);
useEffect(() => {
if (!availableLifecycles.length) setSelectedLifecycles([]);
}, [availableLifecycles]);
if (!availableLifecycles.length) return null;
return (
@@ -99,6 +99,10 @@ export const EntityOwnerPicker = () => {
}
}, [queryParamOwners, availableOwners]);
useEffect(() => {
if (!availableOwners.length) setSelectedOwners([]);
}, [availableOwners]);
if (!availableOwners.length) return null;
return (