Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Watch" the current status of the sheet #4

Closed
RSchneider94 opened this issue Nov 6, 2023 · 3 comments
Closed

"Watch" the current status of the sheet #4

RSchneider94 opened this issue Nov 6, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@RSchneider94
Copy link

Hey, really easy, tiny and amazing library you have built, thanks for that!

I'm starting to make use of it, but I'm now with a small issue here that other libraries that I have used before had that option. It's missing a way to know if the sheet is currently open or not and/or even add some callback prop like onSheetClose.

This is useful, because for example in my current scenario here: I have a component (which is basically a FlatList that is rendered inside of the Sheet), but this list does receive a prop from the parent component that I have where the Sheet is being called, you can imagine it like an ID which I'll use to do some edits inside the sheet. Now the problem is, if I have made some changes inside of the list and closed the sheet, the ID will be the same, because the useState still has the same value. If I have some onSheetClose method, I could then clear this ID whenever the sheet gets closed. This would be very useful.

I hope you understand what I meant, and I'd be open to contribute as well.

Thanks!

@stanleyugwu stanleyugwu added the enhancement New feature or request label Nov 8, 2023
@stanleyugwu
Copy link
Owner

Hey @RSchneider94 I'm glad you find this package useful, and thanks for pointing this out.

Fortunately, onClose and onOpen callbacks have been implemented here. I'll publish a new version that reflects that soon.

If you need to use this now you can install from the main branch https://github.com/stanleyugwu/react-native-bottom-sheet.git#main

@stanleyugwu
Copy link
Owner

Hello again @RSchneider94 , sliding in to let you know I've released version 0.2.0 which has the requested features.
So you can bump to latest version in your project, thanks 🚀

@RSchneider94
Copy link
Author

Hello again @RSchneider94 , sliding in to let you know I've released version 0.2.0 which has the requested features. So you can bump to latest version in your project, thanks 🚀

hey @stanleyugwu !! I have updated to the latest version and it works really well, thanks again for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants