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
218 stars 80 forks source link

BottomSheet Error open from rootlayout angular 13 #378

Open wuilmerj24 opened 2 years ago

wuilmerj24 commented 2 years ago

Make sure to check the demo app(s) for sample usage

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.

I try to open a bottomsheet from a rootlayout. But it shows an error: JS: ERROR Error: Uncaught (in promise): Error: java.lang.NullPointerException: Attempt to invoke virtual method 'androidx.fragment.app.FragmentTransaction androidx.fragment.app.FragmentTransaction.add(androidx.fragment.app.Fragment, java.lang.String)' on a null object reference JS: _showNativeBottomSheet(file: src/webpack:/rootLSheet/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet.android.js:185:0) JS: at showBottomSheet(file: src/webpack:/rootLSheet/node_modules/@nativescript-community/ui-material-bottomsheet/bottomsheet-common.js:101:0) JS: at (file: src/webpack:/rootLSheet/node_modules/@nativescript-community/ui-material-bottomsheet/angular/fesm2015/nativescript-community-ui-material-bottomsheet-angular.mjs:31:0) JS: at invoke(file: src/webpack:/rootLSheet/node_modules/zone.js/fesm2015/zone.js:372:0) JS: at onInvoke(file: src/webpack:/rootLSheet/node_modules/@angular/core/fesm2015/core.mjs:25548:0) JS: at invoke(file: src/webpack:/rootLSheet/node_modules/zone.js/fesm2015/zone.js:371:0) JS: at run(file: src/webpack:/rootLSheet/node_modules/zone.js/fesm2015/zone.js:134:0) JS: at (file: src/webpack:/rootLSheet/node_modules/zone.js/fesm2015/zone.js:1275:0) JS: at invokeTask(file:///data/data/org.nativescri... `const options: BottomSheetOptions = { viewContainerRef: this.containerRef, context: ['Facebook', 'Google', 'Twitter'], animated:true, peekHeight:200, transparent:true, };

    this.bottomSheet.show(ItemDetailComponent, options)`