You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportconstloader=async()=>{constmyObjPromise=getMyObj();// returns a promisereturndefer({myObj: myObjPromise});};
And I'm rendering this:
exportdefaultfunctionPage(){const{ myObj }=useLoaderData();const[searchParams,setSearchParams]=useSearchParams();constsearchQ=searchParams.get("q");constonValueChange=(value)=>{setSearchParams((prev)=>{prev.set("q",value);returnprev;});};return(<div><selectvalue={searchQ}onValueChange={onValueChange}>
... // select options</select><Suspensefallback={<Skeleton/>}><Awaitresolve={myObj}>{(myObj)=>()}// render myObj when its resolved</Await></Suspense></div>);}
If there's a brief latency for getMyObj to resolve, the select component isn't clickable for some reason. Only after the promise resolves can I click on the select.
Is this the expected behaviour? I'm a bit confused on why this is happening.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Say I have a deferred loader like
And I'm rendering this:
If there's a brief latency for
getMyObj
to resolve, theselect
component isn't clickable for some reason. Only after the promise resolves can I click on the select.Is this the expected behaviour? I'm a bit confused on why this is happening.
Beta Was this translation helpful? Give feedback.
All reactions