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
If the datatable have display:none and the columnMode is 'force', on new databind it lose the size of columns.
Expected behavior
When i set display:block the datatable must be showed in the correct size.
Reproduction of the problem
Bind some data to datatable
Set the datatable or it's container to display:none, like:
<div id="mainContainer"> <-- style="display:none"
<div id="">
<ngx-datatable [columnMode]="'force'">
....
</ngx-datatable>
</div>
<div>
3.Perform a dataset change on the datatable
What is the motivation / use case for changing the behavior?
because the rendered table is unusable.
Please tell us about your environment:
Angular CLI: 6.1.4
Node: 9.8.0
OS: win32 x64
Angular: 6.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
@angular-devkit/architect 0.7.4
@angular-devkit/build-angular 0.7.4
@angular-devkit/build-optimizer 0.7.4
@angular-devkit/build-webpack 0.7.4
@angular-devkit/core 0.7.4
@angular-devkit/schematics 0.7.4
@angular/cli 6.1.4
@ngtools/webpack 6.1.4
@schematics/angular 0.7.4
@schematics/update 0.7.4
rxjs 6.2.2
typescript 2.9.2
webpack 4.9.2
Table version:
13.1.0
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 ]
all browsers have this issue, but whe use chrome for dev purpose
i've made an example to explain the problem: Datatable columnMode="'force'" test
Follow this steps:
ps. If you inspect the html code on a "datatable-body-cell" before pressing Hide and then AddData, looking at the width, you can see it turns to 0 after pressing AddData.
If then you press Show and another time AddData the cells regain the correct size
Thanks for help!
Hi, i have the same issue, is it possible to have a fix?
thanks
Most helpful comment
i've made an example to explain the problem: Datatable columnMode="'force'" test
Follow this steps:
ps. If you inspect the html code on a "datatable-body-cell" before pressing Hide and then AddData, looking at the width, you can see it turns to 0 after pressing AddData.
If then you press Show and another time AddData the cells regain the correct size
Thanks for help!