-
Notifications
You must be signed in to change notification settings - Fork 763
[Tabs][Datagrid]Initial column width for datagrid column appearing as zero #3273
Comments
Hi there, I looked at the example (thank you for that). It looks like there were some implementation issues that were causing the misalignment. It's hard to tell what the data should be but when I clean up the template and declare the datagrid as described by the documentation for binding properties, then column widths work as intended. I'm closing this as it doesn't seem to be an issue. If you have more questions about getting the datagrid up and running please ask on stack overflow and tag it with Here is a working version of the original example: https://stackblitz.com/edit/gh-3273-datagrid-column-width-question |
There is something odd with your example code but I didn't dig deep enough to figure out exactly what. I checked with a simple datagrid that column widths are calculating as expected: https://stackblitz.com/edit/datagrid-simple-columnwidth If this issue is happening in a production app, then I would suggest starting with the simplest grid you can e.g hard coded (like in the example) and then adding on more complexity (real data and real interpolation of the data for the names and values in headers and cells). |
The issue occurs when the datagrid is present in vertical tabs. For some of the pages we are required to keep the datagrid within vertical tabs. Please let us know if there is a work around for this. Can you please re-open this issue because we are seeing this issue whenever datagrids are present in vertical tabs. In our case this happens to be a major use case. Let us know if there is any other information required. |
Hi there. It sounds like from the last comment this is with a vertical tabs layout, correct? I'll re-opan and label this as waiting for more information. Please provide a reproduction with stackblitz that demonstrates the issue. For simplicity, please fork the simple datagrid stackblitz from above and add your vertical tabs code to it. |
I have updated the code. The issue is seen with the latest version of clarity. Not sure after which version it stopped working. The issue can be seen with 1.1.2. Working fine till 1.0.4. The reproduction with stackblitz attached. I have updated the clarity version. The link https://stackblitz.com/edit/datagrid-simple-columnwidth-with-tabs. |
Thanks for the reproduction. It seems like a lifecycle issue and will need more investigation. |
I researched it a bit, though I don't yet have a solution. |
* [NG] Fix datagrid column sizing inside *clrIfActive (#3273) Datagrid column sizing lifecycle was calculating column widths when tab-content was not yet attached to the DOM, resulting in width: 0px. Partly reverted the projection back to ng-content. Added integration test to verify this scenario. Signed-off-by: Ivan Donchev <idonchev@vmware.com>
…#3273) Viewchild setter initialization of ref in service, as advised by Shijir. This overcomes latency in the initialization of the container vs the templated content. Signed-off-by: Ivan Donchev <idonchev@vmware.com>
…#3273) Viewchild setter initialization of ref in service, as advised by Shijir. This overcomes latency in the initialization of the container vs the templated content. Signed-off-by: Ivan Donchev <idonchev@vmware.com>
) (vmware-archive#3318) * [NG] Fix datagrid column sizing inside *clrIfActive (vmware-archive#3273) Datagrid column sizing lifecycle was calculating column widths when tab-content was not yet attached to the DOM, resulting in width: 0px. Partly reverted the projection back to ng-content. Added integration test to verify this scenario. Signed-off-by: Ivan Donchev <idonchev@vmware.com>
* [NG] Lifecycle fix for tabs templating initialization (#3273) Viewchild setter initialization of ref in service, as advised by Shijir. This overcomes latency in the initialization of the container vs the templated content. Signed-off-by: Ivan Donchev <idonchev@vmware.com>
Viewchild setter initialization of ref in service, as advised by Shijir. This overcomes latency in the initialization of the container vs the templated content. (cherry picked from commit 7135fce) Signed-off-by: Ivan Donchev <idonchev@vmware.com>
Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary. |
Describe the bug
When datagrid is placed within tabs the initial width of column header is appearing as zero due to this there are alignment issues when minimum column width is provided. When the column
is resized the widths are updated correctly
How to reproduce
https://stackblitz.com/edit/clarity-dark-theme-v1-0-datagrid-issue
Check the width of the column during after initial rendering.
Steps to reproduce the behavior:
Expected behavior
The column width should be non-zero after initial rendering
Versions
App
Angular: 7.2
Clarity: 1.1.2
Device:
OS: [Windows Server 2012]
Browser [Chrome]
Version 72.0.3626.121
The text was updated successfully, but these errors were encountered: