nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
219 stars 80 forks source link

fix: (iOS) fix trackingScrollView and peekHeight #331

Closed vallemar closed 3 years ago

vallemar commented 3 years ago

For a sheet to expand, you need to set the trackingScrollView according to the documentation. Then I realized that it did not work. Now it is spreading and collapsing!

vallemar commented 3 years ago

I think the same thing will happen to all these properties, I have not tried it

farfromrefug commented 3 years ago

@vallemar awesome fix!!!!

farfromrefug commented 3 years ago

@vallemar in fact the change for trackingScrollView is not necessary. https://github.com/material-components/material-components-ios/blob/dfe9dcb58ef177a13cb6b1f28f47c88eeba401cd/components/BottomSheet/src/MDCBottomSheetController.m They do it. BTW if we have typings it means it should works (typings created from native lib)

vallemar commented 3 years ago

@farfromrefug I do not understand, when I added it has started to work, before it did not. (it may also be that I do not understand your previous comment, my English is sad)

farfromrefug commented 3 years ago

@vallemar must have not been working until you set the trackingScrollView. But seeing the native code setting the prop on the bottomsheet controller or its transition controller makes no diffference. EDIT: anyway i published with your changes 6.0.3

vallemar commented 3 years ago

@farfromrefug I realized some time ago that in android when you have a scrollview and you go down you can't go back up to the top. In a personal application I solved it by wrapping my scrollview in a NestedScrollView. Could we do something to wrap the sheets with trackingScrollView in a NestedScrollView?

farfromrefug commented 3 years ago

@vallemar you are right it needs a NestedScrollView. And no we cant do it on this side. We need this https://github.com/NativeScript/NativeScript/pull/9199