You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by iu...@apache.org on 2021/11/19 12:29:07 UTC

[brooklyn-ui] branch master updated: Do not restore search when the icon triggers selection directly or shows popup in catalog-selector

This is an automated email from the ASF dual-hosted git repository.

iuliana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git


The following commit(s) were added to refs/heads/master by this push:
     new a74ca78  Do not restore search when the icon triggers selection directly or shows popup in catalog-selector
     new f0419e6  Merge pull request #312 from algairim/composer-improvements
a74ca78 is described below

commit a74ca789b5cf4c383717f2fc225690a21c8894b5
Author: Mykola Mandra <my...@cloudsoft.io>
AuthorDate: Fri Nov 19 11:22:08 2021 +0000

    Do not restore search when the icon triggers selection directly or shows popup in catalog-selector
    
    Signed-off-by: Mykola Mandra <my...@cloudsoft.io>
---
 .../app/components/catalog-selector/catalog-selector.directive.js     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js
index d112a6e..86b0404 100644
--- a/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js
+++ b/ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js
@@ -71,7 +71,7 @@ export function catalogSelectorDirective() {
             family: '<',
             onSelect: '&', // action to do when item is selected
             onSelectText: "&?", // function returning text to show in the "on select" button for an item
-            iconSelects: '<?',  // boolean whether clicking the icon triggers selection directly or shows popup (false, default)
+            iconSelects: '<?',  // boolean whether clicking the icon triggers selection directly or shows popup (false by default)
             rowsPerPage: '<?',  // optionally show fixed number of rows; unset (default and normal) computes based on available height
             reservedKeys: '<?',
             state: '<?', // for shared state usage
@@ -120,7 +120,7 @@ export function catalogSelectorDirective() {
                 : PALETTE_VIEW_MODES.normal
         };
 
-        if(!$scope.search) {
+        if(!$scope.search && !$scope.iconSelects) { // Do not restore search when the icon triggers selection directly or shows popup - `iconSelects == true`.
             const savedSearch = sessionStorage.getItem(SESSION_KEYS.QUERY);
             if (typeof savedSearch === 'string' && savedSearch.length) $scope.search = savedSearch;
         }