Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column with [maxWidth] not properly computed after zooming #2148

Open
edsdev1 opened this issue Apr 11, 2023 · 0 comments
Open

Column with [maxWidth] not properly computed after zooming #2148

edsdev1 opened this issue Apr 11, 2023 · 0 comments

Comments

@edsdev1
Copy link

edsdev1 commented Apr 11, 2023

I'm submitting a ... (check one with "x")

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior

ngx-datatable-column with maxWidth incorrectly calculates width when the browser is zoom-out (~25%) and then zoom-in (~110%). Observe column width collapses in the demo provided below.

Expected behavior

zoom-out/in should not collapse those columns with maxWidth

Reproduction of the problem

Here is a simple demo on StackBlitz, where it only contains 3 ngx-datatable-column with maxWidth:
https://stackblitz.com/edit/base-angular-12-app-gl216j?file=src%2Fapp%2Fapp.component.html

The demo essentially contains only this:
`

        <ngx-datatable    [columnMode]="'force'"    [rows]="[{a: 'aa',b: 'bb',c: 'cc'}]" >
             <ngx-datatable-column prop="Column-1"> </ngx-datatable-column>
            <ngx-datatable-column prop="Column-2" [maxWidth]="200"></ngx-datatable-column>
            <ngx-datatable-column prop="Column-3"> </ngx-datatable-column>

       </ngx-datatable>

`

Please tell us about your environment:
Max OS: Catalina 10.15.7

  • Table version:

  • v20.1.0. (but reproducible even in v15.x)

  • Angular version:
    v-12.x. (but I have tested with v7, v11, too)

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Google Chrome: Version 111.0.5563.146 (Official Build) (x86_64)
Safari : Version 15.4 (15613.1.17.1.13, 15613)

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
  • typescript ~4.3.5. (but reproducible in earlier versions, too)
@edsdev1 edsdev1 changed the title Column with [maxWidth] collapses the column width when zooming out & in Column with [maxWidth] not properly computed after zooming Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant