react-spring-bottom-sheet
react-spring-bottom-sheet copied to clipboard
conditional fetching with onSpringStart it make glitching issue or ropen twice the bottomsheet
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
I really need help, again thanks guys have a nice day
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.