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

[BottomSheet][NS 8.2][iOS only] App hangs when opening a bottom sheet with DatePicker #380

Closed MrSnoozles closed 2 years ago

MrSnoozles commented 2 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

When the "inner" component of a bottom sheet contains a DatePicker, the app becomes unresponsive and has to be restarted. I noticed this behaviour after updating from NativeScript 8.1 to 8.2.

Is there any code involved?

BottomSheetBug.zip

MrSnoozles commented 2 years ago

Update: If the inner component is wrapped in a <Page> tag, it works without hanging. But then the styling is off and I suppose there will be other side effects.

farfromrefug commented 2 years ago

@MrSnoozles It is actually a big issue with N which appeared in 8.2.0. Trying to pinpoint it but it is slow process

farfromrefug commented 2 years ago

@MrSnoozles Should be fixed in 7.0.4

MrSnoozles commented 2 years ago

Fixed. Thank you very much.

MrSnoozles commented 2 years ago

Hi @farfromrefug . I have to reopen this issue, unfortunately. It seems like there has been a regression between ui-material-bottomsheet 7.0.7 and 7.0.8. When having a datepicker in a bottom sheet, the application now crashes immediately when closing the bottom sheet.

nativescript-bottomsheet

I already create an example repository so you can reproduce the issue: https://github.com/MrSnoozles/nativescript-bug-bottomsheet-datepicker

The error message is

NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'nativeViewProtected' of undefined
at
getAvailableSpaceFromParent(file: app/webpack:/bottomsheet-datepicker/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet.ios.js:159:0)
at layoutView(file: app/webpack:/bottomsheet-datepicker/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet.ios.js:109:0)
at MDLayoutViewController.viewDidLayoutSubviews(file: app/webpack:/bottomsheet-datepicker/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet.ios.js:214:0)
farfromrefug commented 2 years ago

@MrSnoozles should be fixed in 7.0.24

MrSnoozles commented 2 years ago

Confirmed. It's fixed. Thank you