You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2019/12/02 14:01:29 UTC

[GitHub] [brooklyn-ui] tbouron commented on a change in pull request #148: corrects pagination issue

tbouron commented on a change in pull request #148: corrects pagination issue
URL: https://github.com/apache/brooklyn-ui/pull/148#discussion_r352608253
 
 

 ##########
 File path: ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js
 ##########
 @@ -350,9 +349,10 @@ export function catalogSelectorDirective() {
                 // no main, or hidden, or items per page fixed
                 return;
             }
-            let header = angular.element(main[0].querySelector(".catalog-palette-header"));
-            let footer = angular.element(main[0].querySelector(".catalog-palette-footer"));
-            rowsPerPage = Math.max(MIN_ROWS_PER_PAGE, Math.floor((main[0].offsetHeight - header[0].offsetHeight - footer[0].offsetHeight - 16) / ($scope.state.viewMode.rowHeightPx || 96)));
+            let palette = angular.element(document.getElementsByClassName("palette-and-or-toolbar"));
 
 Review comment:
   Could you use the same syntax as the other 2 below, to keep things consistent.
   
   Also:
   - `palette-and-or-toolbar` does include the main toolbar. So either you need to use another selector, or subtract the toolbar height (would go for the first option)
   - `main` is not used anymore so it should be removed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services