@@ -106,6 +106,8 @@ qx.Class.define("osparc.dashboard.ResourceBrowserFilter", {
106106 this . getChildControl ( "filters-spacer" ) ;
107107 this . getChildControl ( "shared-with-layout" ) ;
108108 this . getChildControl ( "tags-layout" ) ;
109+ this . __populateTags ( ) ;
110+ osparc . store . Tags . getInstance ( ) . addListener ( "tagsChanged" , ( ) => this . __populateTags ( ) , this ) ;
109111 break ;
110112 case "service" :
111113 this . getChildControl ( "filters-spacer" ) ;
@@ -371,12 +373,6 @@ qx.Class.define("osparc.dashboard.ResourceBrowserFilter", {
371373 __createTagsFilterLayout : function ( ) {
372374 const tagsLayout = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 2 ) ) ;
373375 osparc . utils . Utils . setIdToWidget ( tagsLayout , this . __resourceType + "-tagsFilter" ) ;
374-
375- this . __populateTags ( tagsLayout , [ ] ) ;
376- osparc . store . Tags . getInstance ( ) . addListener ( "tagsChanged" , ( ) => {
377- this . __populateTags ( tagsLayout , this . __getSelectedTagIds ( ) ) ;
378- } , this ) ;
379-
380376 return tagsLayout ;
381377 } ,
382378
@@ -385,10 +381,12 @@ qx.Class.define("osparc.dashboard.ResourceBrowserFilter", {
385381 return selectedTagIds ;
386382 } ,
387383
388- __populateTags : function ( tagsLayout , selectedTagIds ) {
384+ __populateTags : function ( ) {
385+ const selectedTagIds = this . __getSelectedTagIds ( ) ;
386+ const tagsLayout = this . getChildControl ( "tags-layout" ) ;
387+ tagsLayout . removeAll ( ) ;
389388 const maxTags = 10 ;
390389 this . __tagButtons = [ ] ;
391- tagsLayout . removeAll ( ) ;
392390 osparc . store . Tags . getInstance ( ) . getTags ( ) . forEach ( ( tag , idx ) => {
393391 const button = new qx . ui . form . ToggleButton ( null , "@FontAwesome5Solid/tag/16" ) ;
394392 button . id = tag . getTagId ( ) ;
0 commit comments