v18 Tabs and TabMenu in same module only generate styles for TabMenu #16395
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
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:
and the styles are correctly applied to the tabs.
with TabMenuModule included in the build the following styles are generated:
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
The text was updated successfully, but these errors were encountered: