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

Is it possible to set snapshot as the content height value? #69

Closed
jungpaeng opened this issue Mar 16, 2022 · 6 comments
Closed

Is it possible to set snapshot as the content height value? #69

jungpaeng opened this issue Mar 16, 2022 · 6 comments

Comments

@jungpaeng
Copy link

If the content height is 300, I would like to set the snapshot to 300.
Also, if the height of the content changes, I want to recognize it.

@jungpaeng
Copy link
Author

It is similar to this issue. #46
In react-spring-bottom-sheet, the minHeight argument is provided to the snapshot points

@milosjovancevic
Copy link

milosjovancevic commented Jul 21, 2022

Hello folks, any updates on this? On my project I have 3 or 4 sheet's with different children(height). Any idea how to make Sheet height dynamic?

@milosjovancevic
Copy link

milosjovancevic commented Jul 21, 2022

Hello again,
After some time spent on figuring out solution (I failed to do so) I came by a pull request opened in repository #83 which solved the problem I had. Since my project deadline is soon I decided to fork the solution from this exceptional gentleman & developer @nickgraffis and publish it in npm.
Here is the link in case someone needs it https://www.npmjs.com/package/@milosj/react-modal-sheet

After that you just add useContentHeight prop to your Sheet component and everything works like a charm. Sheet height is adjusted to the height of the children.

Once more big thanks to @nickgraffis!

Best regards,
Miloš

@Temzasse
Copy link
Owner

Sorry for taking so long to respond to this 😅

I took a look at the PR and it seems like a good change (just need to resolve some prop naming nit picks). I wonder if there are other things that should be taken into account for this to work as people expect 🤔 I guess we can publish the fix from Nick and figure out other things later if this change already helps people.

@aliceathens
Copy link

Sorry for taking so long to respond to this 😅

I took a look at the PR and it seems like a good change (just need to resolve some prop naming nit picks). I wonder if there are other things that should be taken into account for this to work as people expect 🤔 I guess we can publish the fix from Nick and figure out other things later if this change already helps people.

I would really appreciate this feature!

@Temzasse
Copy link
Owner

Sheet detent is now implemented in v1.7.0. Please let me know if it doesn't solve your content height related issues 🙂

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

No branches or pull requests

4 participants