primeng icon indicating copy to clipboard operation
primeng copied to clipboard

v18 Tabs and TabMenu in same module only generate styles for TabMenu

Open RichardMcElroy opened this issue 2 years ago • 1 comments

Describe the bug

When using the Tabs component and TabMenu component together, only the style for TabMenu is generated in the browser.

Commenting the TabMenu out of the build results in the correct styles being added for the Tabs component.

I am using app.module.ts and not standalone components, although I imagine the same problem will exist if you use both components in the same standalone component.

app.module.ts

import { TabsModule, Tabs, TabPanel } from 'primeng/tabs'; import { TabMenuModule } from 'primeng/tabmenu';

@NgModule({ ... imports: [ ... TabsModule, Tabs, TabPanel, TabMenuModule,

with TabMenuModule commented from the build the following styles are generated in the browser: image

and the styles are correctly applied to the tabs. with TabMenuModule included in the build the following styles are generated: image

and no styles are generated for the Tabs component, while the TabMenu component has the correct styling.

NOTE: the SAME data-primeng-style-id="tabs-style" is used for BOTH cases - is this possibly the cause?

A temporary workaround is adding the Tabs component styles to style.css

Environment

Development

Reproducer

No response

Angular version

18.2.0

PrimeNG version

18.0.0-beta.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.20.4

Browser(s)

No response

Steps to reproduce the behavior

Add the TabsModule and TabMenuModule to the same angular module and only styles for TabMenuModule are generated

Expected behavior

Styles for both components should be generated

RichardMcElroy avatar Sep 17 '24 14:09 RichardMcElroy

Hi,

Thanks for reporting the issue, it's already fixed in https://github.com/primefaces/primeng/commit/dd9d186fe2e25d806bfb41b41631999cf038fc8c

Fix will be available with 18.0.0.-beta.3

Closing the issue.

cetincakiroglu avatar Oct 16 '24 10:10 cetincakiroglu