cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Widget extension - updateSelection is not working

FredSilva92
5-Regular Member

Widget extension - updateSelection is not working

Hi PTC community

 

I'm developing a dropdown widget where i'm testing when you select an option on dropdown, the "selected row(s)"  should be triggered and populate a bounded widget with the options selected:

 

FredSilva92_0-1597422291140.png

 

But i'm using the fun updateSelection as solutionsDropdown.updateSelection('Data', [0]), where solutionsDropdown is my widget and it's not working.

I'm using typescript along with template provided by PTC on github.

Do you have ideias?
Looking forward for your answer,

Thanks a lot.
Frederico Silva

1 REPLY 1

Hello,

 

I am assuming that your custom widget's property name is Data. You should also ensure that the element you return from renderHtml has the widget-content class applied to it.

 

Where in your widget do you invoke updateSelection? Can you verify via the inspector that that section of code does indeed execute?

 

It could be possible that the method containing your call to updateSelection doesn't get invoked at all for some reason or that some other expression throws before that call is made.

Top Tags