Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi,
I've modified the list to have a service that,when triggered, will reset the selected row to null (for the dropdown).
This is mostly what I have in the Runtime JS.
Now the problem is, it does remove the selected value on the dropdown actual value, But when I open the dropdown the value is still selected.
How would I remove the selectedItem from data ?
this.serviceInvoked = function ( serviceName )
{
var thisWidget = this;
switch ( serviceName )
{
case 'ClearSelectedItem':
this.resetData();
break;
default:
TW.log.error( 'Folding Panel widget, unexpected serviceName invoked "' + serviceName + '"' );
}
};
this.resetData = function ()
{
var thisWidget = this;
thisWidget.updateSelection( 'Data', [] );
thisWidget.clearCurrentValueHtml();
thisWidget.setProperty( 'SelectedText', undefined );
thisWidget.updateSelection( 'Data', [] );
};
Frederic, Looking at the documentation list widget has property SelectedText that is field value that is currently selected and SelectedItems that is defined as infotable field that is currently selected. Have you tried unsetting the SelectedItems instead of SelectedText?
Hi thank you for recommending this,
I've tried it by adding this line or code (I've tried two way) :
1- thisWidget.setProperty( 'SelectedItems', [] );
2- thisWidget.setProperty( 'SelectedItems', undefined );
None of these lines worked, maybe I'm doing something wrong or maybe selectedItems doesn't work that way.