react-spring-bottom-sheet icon indicating copy to clipboard operation
react-spring-bottom-sheet copied to clipboard

conditional fetching with onSpringStart it make glitching issue or ropen twice the bottomsheet

Open wibawasuyadnya opened this issue 1 year ago • 2 comments

when !data && isLoading i have different element and it has Skeleton for Callback if my data is not fetched already but when it finish fetching the bottomsheet close it self and reopen again with the fetched data. does anyone know how to handle this ? ps : i already do anything async axios get inside the onSpringStart and now I still stick with my useSWR with fetcher async axios.get function and define function Promise and call them with await inside the onSpringStart but it still presist on first or initial load i click on bottomsheet it was open like I just say earlier with isLoading or the Callback but when it finish fetched it close and reopen again quickly and this is really annoy me sorry but thanks cool package though btw I just want the bottomsheet just still open even my data isn't fully fetched or waiting for fetch successed just like inside page normally

wibawasuyadnya avatar May 30 '23 07:05 wibawasuyadnya

I really need help, again thanks guys have a nice day

wibawasuyadnya avatar May 30 '23 07:05 wibawasuyadnya

I just discovered that you can send a callback to fetch data inside the body of the modal. and inside there, it can run the loading animation while it calls the api, and then replace that to the actual content... that worked for me.

flickleafy avatar Sep 14 '23 22:09 flickleafy