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

TabView: Scroll buttons are not displayed when adding tabPanel dynamically #13530

Closed
RomDuvi opened this issue Aug 22, 2023 · 4 comments · Fixed by #14668
Closed

TabView: Scroll buttons are not displayed when adding tabPanel dynamically #13530

RomDuvi opened this issue Aug 22, 2023 · 4 comments · Fixed by #14668
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@RomDuvi
Copy link

RomDuvi commented Aug 22, 2023

Describe the bug

When adding tabPanels to a tabView, the scroll button is not displayed in the nav container of the tabView in case of overflow.
This behavior worked in PrimeNg 16.0.0.

If the tabView is instantiated with a number of tabPanels exceeding the tabView's nav container width, scroll buttons are correctly displayed.

Environment

Primeng 16.2.0
Angular 16.2.1
Node 18.12.1
Chrome 116

Reproducer

https://stackblitz.com/edit/github-fdxap3?file=src%2Fapp%2Fapp.component.ts

Angular version

16.2.1

PrimeNG version

16.2.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.12.1

Browser(s)

Chrome 116

Steps to reproduce the behavior

Create a tabView and add tabPanels until the width of the tabPanel list exceeds the tabView container.
The scroll buttons are not displayed.

Expected behavior

Scroll buttons are displayed as soon as a new tabPanel is added to the tabView and the tabPanels exceed the width of the tabView container.

@RomDuvi RomDuvi added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 22, 2023
@SoyDiego
Copy link
Contributor

SoyDiego commented Aug 22, 2023

Hi, @RomDuvi. please edit the title of your issue for example: TabView: Scroll buttons are not displayed.

I have checked the stackblitz and I can see displayed the scroll buttons (arrows).
And the buttons disappear when you are at the beginning or end of the TabView.

Maybe I didn't understand something. If you can give more info or record a gif or something will be better.

Thanks

@RomDuvi RomDuvi changed the title Component: Title TabView: Scroll buttons are not displayed when adding tabPanel dynamically Aug 22, 2023
@RomDuvi
Copy link
Author

RomDuvi commented Aug 22, 2023

@SoyDiego , thanks for your answer :)
Sorry for the title, it has been updated.

In the stackblitz example, when I click the "Add button" multiple times it pushes new tabPanel to the tabView but the scroll button is never displayed.
image

Thanks for your help,

@lukasloetkolben
Copy link

tabs

I've encountered the same issue.
The scroll arrow isn't displaying when adding a new tab.

@miki995
Copy link
Contributor

miki995 commented Jan 30, 2024

@mehmetcetin01140 @cetincakiroglu Hi, I have fixed the issue, can you please check the code and hopefully merge it?
Still happening in v17.4.0

Thanks

miki995 added a commit to miki995/primeng that referenced this issue Jan 30, 2024
cetincakiroglu added a commit that referenced this issue Feb 23, 2024
Fixed #13530 TabView: Scroll buttons are not displayed when adding ta…
@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 Feb 23, 2024
@cetincakiroglu cetincakiroglu added this to the 17.8.0 milestone Feb 23, 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

Successfully merging a pull request may close this issue.

5 participants