@@ -220,8 +220,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
220220 this . __getNextStudiesRequest ( )
221221 . then ( resp => {
222222 if (
223- resp [ "params" ] [ "url" ] . workspaceId !== this . getCurrentWorkspaceId ( ) ||
224- resp [ "params" ] [ "url" ] . folderId !== this . getCurrentFolderId ( )
223+ "workspaceId" in resp [ "params" ] [ "url" ] &&
224+ (
225+ resp [ "params" ] [ "url" ] . workspaceId !== this . getCurrentWorkspaceId ( ) ||
226+ resp [ "params" ] [ "url" ] . folderId !== this . getCurrentFolderId ( )
227+ )
225228 ) {
226229 // Context might have been changed while waiting for the response.
227230 // The new call is on the ways and this can be ignored.
@@ -636,10 +639,6 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
636639 orderBy : JSON . stringify ( this . getOrderBy ( ) ) ,
637640 }
638641 } ;
639- const filterData = this . _searchBarFilter . getFilterData ( ) ;
640- if ( filterData . text ) {
641- params . url [ "text" ] = filterData . text ; // name, description and uuid
642- }
643642
644643 const nextRequestParams = this . __getNextRequestParams ( ) ;
645644 if ( nextRequestParams ) {
@@ -650,8 +649,14 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
650649 resolveWResponse : true
651650 } ;
652651
653- params . url . workspaceId = this . getCurrentWorkspaceId ( ) ;
654- params . url . folderId = this . getCurrentFolderId ( ) ;
652+ const filterData = this . _searchBarFilter . getFilterData ( ) ;
653+ if ( filterData . text ) {
654+ params . url . text = filterData . text ; // name, description and uuid
655+ } else {
656+ params . url . workspaceId = this . getCurrentWorkspaceId ( ) ;
657+ params . url . folderId = this . getCurrentFolderId ( ) ;
658+ }
659+
655660 if ( params . url . text ) {
656661 return osparc . data . Resources . fetch ( "studies" , "getPageSearch" , params , undefined , options ) ;
657662 } else if ( params . url . orderBy ) {
0 commit comments