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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breadcrumb temporarily disappears during resolver data loading #189

Open
l-Legacy-l opened this issue Mar 29, 2024 · 1 comment
Open

Breadcrumb temporarily disappears during resolver data loading #189

l-Legacy-l opened this issue Mar 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@l-Legacy-l
Copy link

l-Legacy-l commented Mar 29, 2024

馃悶 Bug report

Description

When using the breadcrumb component in conjunction with resolver data loading, there is a noticeable flicker or disappearance of part of the breadcrumb during navigation back or when clicking on the breadcrumb link to a component loaded with a resolver.

Breadcrumb become a single label considering I'm having a two-level navigation, like just Component 1 to Component 2 navigation.

馃敩 Minimal Reproduction

  1. Navigate to a component with breadcrumb integrated.
  2. Use the breadcrumb to navigate to a the previous component or navigate back (Component should be loaded with data from resolver).

馃捇Your Environment

Angular Version: 17.1.0

breadcrumb:

<div class="container-breadcrumb">
    <xng-breadcrumb class="link-breadcrumb" separator=">">
      <ng-container *xngBreadcrumbItem="let breadcrumb">
        <ng-container>{{ breadcrumb | translate }}</ng-container>
      </ng-container>
    </xng-breadcrumb>
  </div>

Resolver:


export const getThemesResolver: ResolveFn = (): Observable => {
  const themeService = getThemeService();
  const errorService = getErrorService();
  return themeService.getThemes().pipe(
    tap(themes => {
      // Breadcrumb started to become a single label
    }),
    catchError(error => {
      errorService.handleResolverError(error);
      return of(null);
    })
  );
};

Breadcrumb load:


private buildBreadCrumb(): void {
  this.breadcrumbService.set(this.contextService.getContextForUrl() + '/:procedureId', this.decodeProcedure());
}
private decodeProcedure(): string {
  return this.theme?.getLabel(this.languageService.currentLanguageUpperCase);
}

Thank you for your attention to this matter. Please let me know if you require any further information or assistance in addressing this issue.

@l-Legacy-l l-Legacy-l added the bug Something isn't working label Mar 29, 2024
Copy link

Hello 馃憢 @l-Legacy-l
Thank you for raising an issue. We will investigate into the issue and get back to you as soon as possible. Please make sure you have given us as much context as possible.
Feel free to raise a PR if you can fix the issue. Check the local development guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant