AnsweredAssumed Answered

clear search results when clicked on a button from another widget

Question asked by aesriuser on Apr 4, 2018
Latest reply on Apr 4, 2018 by rscheitlin

I have a default search widget.

When I click on a button in another widget , i want to clear the results from the search widget. Below is how I tried but not clearing the text from the search widget. Can I call the method(_onClearSearch) of the search widget from the other widget? Any ideas?

 

let _searchWidget = this.widgetMan.getWidgetsByName('Search');
on.emit(query(".searchClear"), 'click', _searchWidget[0]._onClearSearch);

 

Thanks for your help!

Outcomes