41
Views
3
Comments
Solved
[OutSystems UI] Issue with lightbox showing the previous image
outsystems-ui
Reactive icon
Forge component by Gonçalo Martins
Application Type
Reactive

Hi,

I am using the Lightbox pattern inside a block that is refreshed by the user making a selection. The issue that I am running into is that when you click on the image to open the lightbox, it keeps showing the fisrt one instead of the refreshed one.

I have attached an example module to illustrate the behaviour. Steps to reproduce:

  1. Select a product. The image is now shown above the table
  2. Click on the image to open the lightbox.
  3. Close it and select another product. The image is refreshed.
  4. Click on the refreshed image. The lightbox now show the first image again.

Is this an issue with the Lightbox pattern? Or have I done something wrong?

Thanks,
Alfio

LightBoxTest.oml
Solution

Hi @Alfio Esposito,

I got it working using two solutions:

  1. Remove the 'disable-url' class from the LightBoxImage ExtendedClass parameter.
  2. Use the ImageURL parameter, to make sure it has the current image expected and updated on the parameterChange (requires usage of the BinaryToURLImage Client Action).


I attached the second solution on the oml below!


Best regards,

Bernardo Cardoso

LightBoxTestSolution.oml

Thanks Bernardo for your quick reponse. The second option works best for me. 

Regards,
Alfio

Thanks! Second option works a treat for me!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.