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 not showing thumbnails after updating images list #6992

Closed
TheZlodziej opened this issue Dec 23, 2024 · 2 comments
Closed

Galleria not showing thumbnails after updating images list #6992

TheZlodziej opened this issue Dec 23, 2024 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@TheZlodziej
Copy link
Contributor

TheZlodziej commented Dec 23, 2024

Describe the bug

Whenever you change :value attribute with thumbnails enabled, they don't update (or update but if you had 2 elements before the update and added 3rd one, it would not show)

I've also found temporary fix for that - you simply do something like this

const galleriaItems = ref<string[]>([...])
const showThumbnails = ref(true)

watch(galleriaItems, () => {
  showThumbnails.value = false
  nextTick(() => {
    showThumbnails.value = true
  })
})

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-etygo6ah?file=src%2FApp.vue

PrimeVue version

4.2.5

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  • create gallery with thumbnails enabled and 2 images
  • add one more image to the list

Expected behavior

The newly added image also appears in the thumbnail list

@TheZlodziej TheZlodziej added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 23, 2024
@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team 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 26, 2024
Copy link

We're unable to replicate your issue, if you are able to create a reproducer by using PrimeVue Issue Template or add details please edit this issue. This issue will be closed if no activities in 20 days.

@TheZlodziej
Copy link
Contributor Author

TheZlodziej commented Dec 26, 2024

Might have had a wrong idea of it before. Seems like it just need a deep watch on the images list..? here is it replicated. I specifically used computed because that's how I was using it in my own app.

@cagataycivici cagataycivici added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Dec 27, 2024
@cagataycivici cagataycivici added this to the 4.2.6 milestone Dec 27, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Dec 27, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Dec 27, 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
Status: Done
Development

No branches or pull requests

3 participants