(null);
useEffect(() => {
+ if (!isShown) {
+ spokenOccasionRef.current = null;
+ return;
+ }
if (spokenOccasionRef.current === occasion) {
return;
}
@@ -520,7 +532,7 @@ function SheetEmptyMessage({
if (text) {
announce(text);
}
- }, [announce, occasion]);
+ }, [announce, isShown, occasion]);
return (
@@ -1994,6 +2006,7 @@ export function MobilePowerSearch({
id={contentResultsId}
message="No results found"
occasion={contentQuery}
+ isShown={step === 'fields'}
/>
) : (
// An empty query with no bootstrap suggestion: the results
@@ -2008,6 +2021,7 @@ export function MobilePowerSearch({
)
) : (
@@ -2144,6 +2158,7 @@ export function MobilePowerSearch({
)
)}