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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
RichardMcElroy opened this issue Sep 17, 2024 · 1 comment
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@RichardMcElroy
Copy link

RichardMcElroy commented Sep 17, 2024

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 RichardMcElroy added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 17, 2024
@cetincakiroglu cetincakiroglu added this to the 18.0.0-beta.3 milestone Oct 11, 2024
@cetincakiroglu cetincakiroglu self-assigned this Oct 16, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

Thanks for reporting the issue, it's already fixed in dd9d186

Fix will be available with 18.0.0.-beta.3

Closing the issue.

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants