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 crashes (iOS, Android, Angular) #143

Open asciidiego opened 4 years ago

asciidiego commented 4 years ago

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

DONE

Make sure to check the existing issues in this repository

DONE

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital letter.

The demo app cannot help because it does not represent the context or state in which the issue occurs to me.

Context:

  1. The modal renders a component BottomSheetManagerComponent. 1.1. This component is inside the feature module HomeModule, which is lazy-loaded through the import statement in the AppRoutingModule.
  2. I am using the page-router-outlet inside the BottomSheetManagerComponent (rendered through the BottomSheetService).
  3. I am using Angular version: 8.2.0

Which platform(s) does your issue occur on?

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

    "nativescript-material-bottomsheet": "3.2.8",

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

  1. Create an application that lazy loads one module, let's call it HomeModule for consistency.
  2. Create a component that will be rendered by the bottomsheet BottomSheetRootComponent
  3. Create a component that will be rendered by BottomSheetRootComponent and name it BottomSheetChildComponent
  4. Create a button that opens the bottomsheet and renders BottomSheetRootComponent
  5. Put a page-router-outlet with the name property set bottomsheetOutlet
  6. Create a path in the HomeModule routing so that it renders the child component in the bottomsheetOutlet. 1.1 See fragment of the code I am using below [1]
  7. Open the bottom sheet and make it render the bottomSheetChildComponent
  8. Close it

Is there any code involved?

[1]:

export const routes: Routes = [
  {
    path: '',
    redirectTo: 'dashboard',
    pathMatch: 'full',
  },
  {
    path: 'dashboard',
    component: HomeComponent,
    children: [
      {
        path: 'list',
        component: SubscriptionsComponent,
        outlet: SUBSCRIPTIONS_OUTLET,
      },
    ],
  },
  {
    path: 'user-subscription/:id',
    component: UserSubscriptionDetailsComponent,
  },
];

Video showing the bug:

https://media.giphy.com/media/Q6xZJeAUYAO5FexGl4/giphy.gif

asciidiego commented 4 years ago

Any news @Akylas?

farfromrefug commented 4 years ago

@diegovincent cant really help without a log of the error. Dont have time to try and reproduce your issue.