Skip to content

menubar: стилизация, сторисы, обёртки#42

Open
khaliulin wants to merge 10 commits intofeature/styles-debugfrom
menu.menubar
Open

menubar: стилизация, сторисы, обёртки#42
khaliulin wants to merge 10 commits intofeature/styles-debugfrom
menu.menubar

Conversation

@khaliulin
Copy link
Copy Markdown

No description provided.

@Component({
selector: 'menubar',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вот это бы кстати распространить на все компоненты и стори тоже. что бы видеть, что это всё работает в онпуш. не все и не всегда этот режим включают, но работать в нём должно.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AxyIX ChangeDetectionStrategy.OnPush добавлен на все компоненты (15 lib + 73 stories).

a5e1f17

<p-menubar [model]="items">
<ng-template pTemplate="item" let-item let-hasSubmenu="hasSubmenu" let-root="root">
<a class="p-menubar-item-link flex items-center gap-2">
<span *ngIf="item.icon" [class]="'p-menubar-item-icon ' + item.icon"></span>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше через @if

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AxyIX *ngIf заменён на @if во всём шаблоне menubar-custom.

283738a

@Component({
selector: 'app-menubar-custom',
standalone: true,
imports: [Menubar, Badge, NgIf, SharedModule],
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

импорт здесь ngif тогда убрать

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AxyIX Импорт NgIf убран из файла и из массива imports компонента.

d7a59bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants