Update viewPath of the list before refresh

Hi guys,

i’m looking for a way to update the list view path before an onRefresh function.
Exactly, I have succeed to update the customViewPath variable and it changes my view, but if i use the search widget, it displays the default view from /modules folder after the refresh.

Is there a function to update the viewPath ?

thanks
Lucas