react-spring-bottom-sheet
react-spring-bottom-sheet copied to clipboard
feat: add containerRef prop for portal
This will allow you to pass a containerRef prop to the portal so that the bottom sheet is rendered where you want it rather than forcing it to be the last element in
This would probably also resolve particular use cases like: https://github.com/stipsan/react-spring-bottom-sheet/issues/77 if I read his question correctly so he can choose where the bottom sheet is rendered rather than mess with z-indexs
would this allow to pointing the scroller element ref? I'm asking because, I would like to have access to the div element into the bottom-sheet that is managing the scroll, to be able to reuse the behavior for some particular cases i.e. I'm using a virtualized list in the content of the bottom-sheet, suppose you have one snap point (within a virtualized list with fix height that is overflowing the first snap until the maxHeight) and would be nice to be able dragging it up to the maxHeight snap and then be able to start scrolling the content like if the sheet overflow exists (there isn't actually because the list height fit into the maxHeight of the sheet)
My question is: how should I use the bottomSheet with a virtualized list to opening quickly, then be draggable up to next snap and then have a smooth scrolling once the sheet reach the maxHeight ?? I have not access to the spring velocity nor the scrollElement ref. Sorry for the long question
@Guiw5 No i think you're asking for something different than what this does. This PR just simply allows you to tell the reach portal where in the DOM to put the bottom sheet.
would this allow to pointing the scroller element ref? I'm asking because, I would like to have access to the div element into the bottom-sheet that is managing the scroll, to be able to reuse the behavior for some particular cases i.e. I'm using a virtualized list in the content of the bottom-sheet, suppose you have one snap point (within a virtualized list with fix height that is overflowing the first snap until the maxHeight) and would be nice to be able dragging it up to the maxHeight snap and then be able to start scrolling the content like if the sheet overflow exists (there isn't actually because the list height fit into the maxHeight of the sheet)
My question is: how should I use the bottomSheet with a virtualized list to opening quickly, then be draggable up to next snap and then have a smooth scrolling once the sheet reach the maxHeight ?? I have not access to the spring velocity nor the scrollElement ref. Sorry for the long question
@stipsan just wanted to let you know this intended use case has been asked in more than one of this sheet libraries, it would be a nice to have feature, it doesn't seems to be much effort butI know you are currently rebuilding this, thanks for everything!
Hello @TylerAHolden and @stipsan I really need this feature added. Can I help with anything to have this merged?
I need this props too...
We need this too.... Is there anything new here yet?
I need this feature too