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

Galleria: change detection not working when changing some input properties #12181

Closed
Jonnyprof opened this issue Nov 10, 2022 · 0 comments · Fixed by #12249
Closed

Galleria: change detection not working when changing some input properties #12181

Jonnyprof opened this issue Nov 10, 2022 · 0 comments · Fixed by #12249
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Jonnyprof
Copy link

Describe the bug

When you change some input properties (p.s. showThumbnails) after galleria is rendered, it not changes galleria DOM, as if not change was detected.

Possible cause:
p-galleriaContent access to galleria variable that is injected in the constructor. When changing some input in galleria that is not an input in galleriaContent will not detect the changes because it not changes the reference of the galleria variable. My guess is that all this galleria.XXXXX variables are not firing a change detection,

[circular]="galleria.circular"
[templates]="galleria.templates"
(onActiveIndexChange)="onActiveIndexChange($event)"
[showIndicators]="galleria.showIndicators"
[changeItemOnIndicatorHover]="galleria.changeItemOnIndicatorHover"
[indicatorFacet]="galleria.indicatorFacet"
[captionFacet]="galleria.captionFacet"
[showItemNavigators]="galleria.showItemNavigators"
[autoPlay]="galleria.autoPlay"

Environment

Ubuntu 22.04.1 LTS

Reproducer

https://stackblitz.com/edit/github-dk9yrn

Angular version

14.2.2

PrimeNG version

14.2.1

Build / Runtime

Angular CLI App

Language

ALL

Node version (for AoT issues node --version)

16.18.0

Browser(s)

No response

Steps to reproduce the behavior

@Input() showThumbnails

  1. Click "Show thumbnail" button. showThumbnails variable is set to false, but thumbnails are still shown
  2. Navigate through the arrows will do the changeDetection.

@Input() autoPlay

  1. Click "Autoplay" button. autoPlay variable is set to true, but galleria doesn't start to autoplay.

Expected behavior

When changing input properties the component should show the changes correctly.

@Jonnyprof Jonnyprof added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 10, 2022
volvachev added a commit to volvachev/primeng that referenced this issue Nov 17, 2022
volvachev added a commit to volvachev/primeng that referenced this issue Nov 17, 2022
@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 Dec 2, 2022
@cetincakiroglu cetincakiroglu added this to the 15.0.0 milestone Dec 2, 2022
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.

2 participants