Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello,
I built a mashup with a dropdown and a collection widget below.
The collection widget contains a dynamic amount of mashups (items). Those mashups have a dynamic height. Using the dropdown I can switch between objects and display the data of the currently selected object.
However, those objects all have different data and therefore the height of the mashup inside the collection widget is dynamic.
I am calculating the mashup height in a service and using the property CellHeightField of the collection widget I managed to make it dynamic.
Everytime I load the page (and the collection widget) the dynamic hight works fine.
The problem is that the widget does not rebuild/refresh when the height changes when I switch to a different object using the dropdown without reloading the page of course. So basically the new height is stored in the CellHeightField but the widget / mashup does not apply the new height and keeps using the old height.
When resizing the browser window the mashup rebuilds and uses the new height.
I tried location.reload() but I do not want a reload of the entire page, I just need a way to rebuild a single widget or the mashups inside.
Is there a way to achieve this?
Best regards
Hi @FS_10272716.
You can use the Expression function by binding SelectedItemsChanged in the drop-down widget to the Evaluate option of the Expression. When creating the Expression, add TW.location.reload() in the content and click Done:
Regards.
--Sharon
Hi @slangley, unfortunately it did not help. Calling TW.location.reload(); in the expression does not have any effect on the UI.
Best regards
Hi @FS_10272716.
Can you share your mashup so we can take a look?
Thanks.
--Sharon