Feat: passing data to present() and dismiss()
See original GitHub issueFeature Request
I miss the possibility to send and receive data to the BottomSheet. Many modal sheets are not in context with each other and currently I have to work with event emitters.
Why it is needed
I use the sheets to show partial screens with settings, or to offer single/multiple choices. The modals are generic and are therefore not a coherent stack. So that I know, for example, after closing, which data has been selected, the passing of data would be very helpful. Currently I use EventListener for this.
Possible implementation
The library should detect if it has an underlying sheet at all at dismiss and pass through the data if it does. If no further sheet opens after the dismiss, no data must be passed through. Passed data via present() or dismiss() should update the state, maybe using a hook.
Code sample
bottomSheetRefNew.current.present({ data })
bottomSheetRef.current.dismiss({ data })
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:11
Top GitHub Comments
Dear annoying Github Bot, its not stale 😄
@mouricef