@@ -1210,12 +1210,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
12101210 }
12111211 // then update the search context this will trigger the search
12121212 const searchContext = data [ "searchContext" ] ;
1213- switch ( searchContext ) {
1214- case osparc . dashboard . StudyBrowser . CONTEXT . SEARCH_PROJECTS :
1215- case osparc . dashboard . StudyBrowser . CONTEXT . SEARCH_TEMPLATES :
1216- case osparc . dashboard . StudyBrowser . CONTEXT . SEARCH_PUBLIC_TEMPLATES :
1217- this . _changeContext ( searchContext ) ;
1218- break ;
1213+ if ( [
1214+ osparc . dashboard . StudyBrowser . CONTEXT . SEARCH_PROJECTS ,
1215+ osparc . dashboard . StudyBrowser . CONTEXT . SEARCH_TEMPLATES ,
1216+ osparc . dashboard . StudyBrowser . CONTEXT . SEARCH_PUBLIC_TEMPLATES ,
1217+ ] . includes ( searchContext ) ) {
1218+ this . _changeContext ( searchContext ) ;
12191219 }
12201220 } ) ;
12211221 } ,
@@ -1304,7 +1304,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
13041304
13051305 _changeContext : function ( context , workspaceId = null , folderId = null ) {
13061306 if (
1307- ! context . includes ( "search" ) && // load projects if search string changed
1307+ ! context . includes ( "search" ) && // move on if it's a search context, it will be handled later
13081308 context === this . getCurrentContext ( ) &&
13091309 workspaceId === this . getCurrentWorkspaceId ( ) &&
13101310 folderId === this . getCurrentFolderId ( )
@@ -1315,11 +1315,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
13151315
13161316 if (
13171317 context . includes ( "search" ) &&
1318+ context === this . getCurrentContext ( ) &&
13181319 this . __lastUrlParams &&
13191320 "text" in this . __lastUrlParams &&
13201321 this . __lastUrlParams [ "text" ] === this . _searchBarFilter . getTextFilterValue ( )
13211322 ) {
1322- // text search didn't change
1323+ // context and text search didn't change
13231324 return ;
13241325 }
13251326
0 commit comments