Open Closed

ABP pages do not fit a visible window area size #10030


User avatar
0
alexander.nikonov created

The biggest issue cause the pages that contain a swimlane datatable component. I can observe that the page size is correct until the table data gets loaded: after this, the column widths are not properly calculated, so the grid does not fit the card container and makes it wider than a visible window area. The scrollable area is not present either and thus, the grid also does not fit a visible window height.

Here is the screenshot to give you the idea:

Also, the mentioned ABP pages ignore page resize event.


7 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • The issue you are experiencing with the Swimlane datatable component in ABP Angular (v9.2.4)—where the grid does not fit the card container, column widths are not recalculated after data load, and the page ignores resize events—is a known challenge with dynamic data tables and container-based layouts.

    • To address this, you should ensure that:

      1. The datatable is placed inside a container with a defined width (e.g., using CSS flex or grid layouts).
      2. After data is loaded, you may need to manually trigger a table resize or recalculate columns. For Swimlane datatable, you can call the recalculate() method on the table component after data is set.
      3. Listen to window resize events and call the table's recalculate() method to ensure the table adapts to container or window size changes.
    • Example for handling resize and recalculation in Angular:

    import { ViewChild, AfterViewInit, HostListener } from '@angular/core';
      import { DatatableComponent } from '@swimlane/ngx-datatable';
    
      export class YourComponent implements AfterViewInit {
        @ViewChild(DatatableComponent) table: DatatableComponent;
    
        ngAfterViewInit() {
          // Call after data is loaded
          setTimeout(() => this.table.recalculate(), 0);
        }
    
        @HostListener('window:resize', ['$event'])
        onResize(event) {
          this.table.recalculate();
        }
      }
    
    • Make sure your CSS does not set the table or its container to width: auto without constraints, as this can cause overflow.

    • If you are using ABP's card or container components, ensure they have overflow: auto or overflow-x: auto set, so scrollbars appear when needed.

    • If the problem persists, check for any custom styles or layout wrappers that might interfere with the datatable's sizing logic.

    No verified source available for this specific query.


    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    alexander.nikonov created

    I have no access to ABP components (and the components inside this page) directly. I have tried to use a service to modify abp-page markup, but I cannot 'fight' recalculate method of datatable component which is obviously invoked, besides, I do not think it's a proper way to resolve the issue.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello,

    Thank you for giving details about the problem. However, I could not produce the same problem on both lepton and lepton-x themes. That would be the best if you could share the related dependencies in your package.json

  • User Avatar
    0
    alexander.nikonov created

    Hi. Here are the dependencies:

    "dependencies": { "@abp/ng.components": "~9.2.4", "@abp/ng.core": "~9.2.4", "@abp/ng.feature-management": "~9.2.4", "@abp/ng.oauth": "~9.2.4", "@abp/ng.permission-management": "~9.2.4", "@abp/ng.setting-management": "~9.2.4", "@abp/ng.theme.shared": "~9.2.4", "@our_lib/base-components": "~19.46.2", "@our_lib/our_lib-abp-common": "^2.0.6", "@our_lib/our_lib-abp-helper": "^2.0.2", "@our_lib/our_lib-components": "^2.0.8", "@our_lib/our_lib-control-config": "^2.0.0", "@our_lib/our_lib-ct-audit-log": "^2.0.5", "@our_lib/our_lib-ct-batch": "^2.0.2", "@our_lib/our_lib-ct-batch-invocation": "^2.0.0", "@our_lib/our_lib-ct-list-spool": "^2.0.4", "@our_lib/our_lib-ct-query-builder": "^2.0.5", "@our_lib/our_lib-ct-reminders": "^2.0.2", "@our_lib/our_lib-dictionary": "^2.0.0", "@our_lib/our_lib-localization": "^2.0.0", "@our_lib/our_lib-modal-window-router-abstractions": "^2.0.0", "@our_lib/our_lib-modal-window-router-bootstrap": "^2.0.0", "@our_lib/our_lib-module-permission": "^2.0.0", "@our_lib/our_lib-report-builder": "^2.0.0", "@our_lib/our_lib-router-outlet": "^2.0.0", "@our_lib/our_lib-utils": "^2.0.0", "@our_lib/our-theme-epsilon": "^2.0.8", "@our_lib/ngb-date-parser-formatter": "^2.0.1", "@agentepsilon/decko": "^2.0.1", "@angular/animations": "~19.2.15", "@angular/cdk": "~19.2.19", "@angular/cdk-experimental": "~19.2.19", "@angular/common": "~19.2.15", "@angular/compiler": "~19.2.15", "@angular/core": "~19.2.15", "@angular/forms": "~19.2.15", "@angular/localize": "~19.2.15", "@angular/material": "~19.2.19", "@angular/material-moment-adapter": "~19.2.19", "@angular/platform-browser": "~19.2.15", "@angular/platform-browser-dynamic": "~19.2.15", "@angular/router": "~19.2.15", "@ctrl/tinycolor": "^4.1.0", "@kolkov/angular-editor": "^2.1.0", "@ng-bootstrap/ng-bootstrap": "~18.0.0", "@ng-select/ng-select": "~14.9.0", "@ngx-dropzone/cdk": "~19.2.1", "@ngx-dropzone/material": "~19.2.1", "@ngxs/router-plugin": "~19.0.0", "@swimlane/ngx-charts": "^22.0.0", "@volo/abp.commercial.ng.ui": "~9.2.4", "@volo/abp.ng.account": "~9.2.4", "@volo/abp.ng.audit-logging": "~9.2.4", "@volo/abp.ng.identity": "~9.2.4", "@volo/abp.ng.language-management": "~9.2.4", "@volo/abp.ng.openiddictpro": "~9.2.4", "@volo/abp.ng.saas": "~9.2.4", "@volo/abp.ng.text-template-management": "~9.2.4", "angular-calendar": "0.31.1", "core-js": "~3.45.1", "date-fns": "^4.1.0", "material-design-icons": "^3.0.1", "moment": "^2.30.1", "ng-zorro-antd": "^19.3.1", "ngx-color-picker": "~19.0.0", "ngx-mask": "^19.0.7", "ngx-moment": "^6.0.2", "normalize.css": "~8.0.1", "rxjs": "~7.8.1", "snq": "^2.0.0", "tslib": "^2.6.3", "uuid": "~13.0.0", "zone.js": "~0.15.1" },

    BTW, this very page gets loaded superslow in Windows browser. Could you please inform the team responsible for this site support? I have sent the message to info@abp.io a week ago or more, but no reaction followed:

    So, from your screenshot I can see that the grid columns are not resized, instead, a horizontal scrolling appears. But anyway: I have tried patching datatable component behavior without luck: the scrollbars do not appear and the grid (and thus the page) content is drawn overflown across the window visible area in both directions.

    Maybe the described problem is related to the fact that we are using our "theme"? But we still need to make ABP page be rendered properly:

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello,

    Maybe the described problem is related to the fact that we are using our "theme"? But we still need to make ABP page be rendered properly:

    Thank you for providing extra details about your application. Regardless of the versions and your own theme configuration seem fine, this part is designed to be used with the scroll when needed.

    If you need to change this behavior, you can check these source code https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html

    https://swimlane.github.io/ngx-datatable/#/

    However, you will need to override/replace the current package elements. You will need to reach source code to do so. You can check this page for this either: https://abp.io/docs/latest/suite/source-code

    You can let us know if you need further assistance. Thank you for your cooperation.

  • User Avatar
    0
    alexander.nikonov created

    Hi.

    Overriding the "wrapper" could be a solution. Though, the perspective of doing it for several pages does not sound very prominent. For instance, here there is no any external component, still the page does not fit vertically a visible window area: And I have not checked other pages yet.

    My theory is that the visible window sizes on ABP pages are somehow calculated incorrectly. So, instead of applying 'patches' to every page, I suggest we determine the root cause.

    P.S. Please inform your site support team regarding this very page loading in desktop browser - it's very slow each time due to numerous slow API requests (it does not occur each time - the problem is usually observed at "cold start" - when I open this page every day for the first time).

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello again,

    This page is designed in a different way than the pages we show a data table. All pages are constructed to be responsive including the last one you mentioned, and it looks different with the default design:

    Maybe the described problem is related to the fact that we are using our "theme"? But we still need to make ABP page be rendered properly:

    As you have also previously mentioned about your custom theme that may end up into these issues.

    P.S. Please inform your site support team regarding this very page loading in desktop browser - it's very slow each time due to numerous slow API requests (it does not occur each time - the problem is usually observed at "cold start" - when I open this page every day for the first time).

    We are optimizing these pages based on the reports if you mean this support page.

    You can let us know if you need further assistance. Thank you for your cooperation.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 27, 2025, 08:34