Skip to content

Conversation

@vaadin-bot
Copy link
Collaborator

This PR cherry-picks changes from the original PR #8437 to branch 24.9.

Original PR description

Description

Ensure that the resources map is updated with the new resource URI. When an image is moved away from the viewport, it can be detached and not available on the server anymore if the client-side requests it again.

Spreadsheet already reloads the image when it is scrolled back into view, but as it was using setProperty to set the resources property in the web component, it didn't trigger the update as Flow didn't detect a change in the property - the resources prop holds the name of the overlays and that indeed doesn't change, only the attribute value related to that resource.

Changed by replacing setProperty with executeJs to ensure that Flow will trigger the update in the web component, thus updating the resource map so it will be used by the img element on creation.

Fixes #8428

Type of change

  • Bugfix

* fix: update resources map on client

Ensure that the resources map is updated with the new resource URI. When
an image is moved away from the viewport, it can be detached and not
available in the server anymore if the client side requests it again.
Spreadsheet already reloads the image when it is scrolled back into
view, but as it was using `setProperty` to set the `resources` property
in the web component, it didn't trigger the update as Flow didn't detect
a change in the property - the `resources` prop holds the name of the
overlays and that indeed doesn't change, only the attribute value
related to that resource.

Changed by replacing `setProperty` with `executeJs` to ensure that Flow
will trigger the update in the web component, thus updating the resource
map so it will be used by the `img` element on creation.

Fixes #8428
@DiegoCardoso DiegoCardoso enabled auto-merge (squash) January 9, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants