Skip to content

Commit 56b32d2

Browse files
fix(nav-drawer): fixing a bug with ripple directive going in material theme. (#14574)
Co-authored-by: Simeon Simeonoff <[email protected]>
1 parent ecb0e40 commit 56b32d2

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

projects/igniteui-angular/src/lib/core/styles/components/navdrawer/_navdrawer-theme.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,18 @@
384384
}
385385

386386
@if $variant == 'material' {
387+
$reduce-size: rem(8px);
388+
389+
// The clip path here fixes a bug: https://github.com/IgniteUI/igniteui-angular/issues/14554
390+
clip-path: inset(calc($reduce-size / 2) 0 round var-get($theme, 'item-border-radius'));
391+
387392
&::after {
388393
content: '';
389394
position: absolute;
390395
width: 100%;
391396
inset-block-start: rem(4px);
392397
inset-inline-start: 0;
393-
height: calc(100% - #{rem(8px)});
398+
height: calc(100% - #{$reduce-size});
394399
border-radius: var-get($theme, 'item-border-radius');
395400
z-index: -1;
396401
}

src/app/app.component.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, OnInit, ViewChild, HostBinding } from '@angular/core';
22
import { Router, NavigationStart, NavigationEnd, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router';
33
import { filter } from 'rxjs/operators';
4-
import { IgxNavigationDrawerComponent, IgxIconService } from 'igniteui-angular';
4+
import { IgxNavigationDrawerComponent, IgxIconService, IgxRippleDirective } from 'igniteui-angular';
55
import { PageHeaderComponent } from './pageHeading/pageHeading.component';
66
import { IgxIconComponent } from '../../projects/igniteui-angular/src/lib/icon/icon.component';
77
import { NgFor, NgIf } from '@angular/common';
@@ -12,19 +12,20 @@ import { IgxNavDrawerTemplateDirective, IgxNavDrawerItemDirective, IgxNavDrawerM
1212
templateUrl: './app.component.html',
1313
styleUrls: ['./app.component.scss'],
1414
standalone: true,
15-
imports: [
16-
IgxNavigationDrawerComponent,
17-
IgxNavDrawerTemplateDirective,
18-
IgxNavDrawerItemDirective,
19-
NgFor,
20-
RouterLinkActive,
21-
RouterLink,
22-
IgxIconComponent,
23-
NgIf,
24-
IgxNavDrawerMiniTemplateDirective,
25-
PageHeaderComponent,
26-
RouterOutlet
27-
]
15+
imports: [
16+
IgxNavigationDrawerComponent,
17+
IgxNavDrawerTemplateDirective,
18+
IgxNavDrawerItemDirective,
19+
NgFor,
20+
RouterLinkActive,
21+
RouterLink,
22+
IgxIconComponent,
23+
NgIf,
24+
IgxNavDrawerMiniTemplateDirective,
25+
PageHeaderComponent,
26+
RouterOutlet,
27+
IgxRippleDirective,
28+
],
2829
})
2930
export class AppComponent implements OnInit {
3031
@HostBinding('attr.id')

0 commit comments

Comments
 (0)