iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
8 stars 2 forks source link

"ConditionalStringValue" doesn't update widget label #665

Open AparupaB opened 6 months ago

AparupaB commented 6 months ago

Describe the bug We (the Substation team) are trying to update a widget's label after it has been loaded. Our use case is, that we have 3 widgets: A, B and C. A and B are the top widgets in the same panel and C is the bottom widget in the same panel. When A is opened we want to set C's label to "equipment browser" and when B is opened we want it to change to "parts browser". I tried to implement it using ConditionalStringValue but it didn't quite work.

As a workaround, it was suggested to use the setLabel method on Uiframework.frontstages.activeFrontstageDef.findWidgetDef(id: string).

Expected behavior The widget label should automatically update when using the ConditionalStringValue and when the event is triggered.

raplemie commented 5 months ago

Thanks for this, we'll look into this!