data-grid: cells are not aligned
See original GitHub issueDescribe the bug
The datagrid cells are sometimes not aligned
To reproduce
In the following example witness the Type
column - rows y
and ...props
<vscode-data-grid>
<vscode-data-grid-row row-type="header">
<vscode-data-grid-cell grid-column="1" cell-type="columnheader"> Name </vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="2" cell-type="columnheader"> Type </vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="3" cell-type="columnheader"> Parent </vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="4" cell-type="columnheader"> Value </vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="5" cell-type="columnheader">
Description
</vscode-data-grid-cell>
</vscode-data-grid-row>
<vscode-data-grid-row>
<vscode-data-grid-cell grid-column="1">
<a href="#">
<code>y*</code>
</a>
</vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="2">
<code>number</code>
</vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="3">
<a href="#">
<code>CandlestickChartLineProps</code>
</a> </vscode-data-grid-cell
>\n<vscode-data-grid-cell grid-column="4">
<code></code> </vscode-data-grid-cell
>\n<vscode-data-grid-cell grid-column="5"> </vscode-data-grid-cell>
</vscode-data-grid-row>
<vscode-data-grid-row>
<vscode-data-grid-cell grid-column="1">
<code>...props</code>
</vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="2">
<code>LineProps</code>
</vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="3"> </vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="4">
<code></code>
</vscode-data-grid-cell>
<vscode-data-grid-cell grid-column="5"> </vscode-data-grid-cell>
</vscode-data-grid-row>
</vscode-data-grid>
Expected behavior
Expected all cells from the same column to be the same size
Screenshots
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
DataGrid column headers not aligned with data - Stack Overflow
I found that simply setting the HeadersVisiblity to "Column" does the trick - see XAML below. Easier than ...
Read more >DataGrid cells not aligned properly #1512 - vmware/clarity
When using clr-dg-pagination and you switch to other page, data in clr-datagrid moves to the right (more, if you have many colomns and...
Read more >DataGrid - Column headers are not aligned with cells if the ...
DataGrid - Column headers are not aligned with cells if the grid is placed inside ScrollView and showScrollbar is set to 'always'.
Read more >Data columns not aligned with header columns when using ...
Bug reported in Blazor - DataGrid - Data columns not aligned with header columns when using Virtualized scrolling and MaskRow with hidden columns....
Read more >React Data Grid: Aligned Grids - AG Grid
The pivot functionality does not work with aligned grids. This is because pivoting data changes the columns, which would make the aligned grids...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, thanks. I’ll try this + some other options in a sample extension environment and will get back to you if I uncover an obvious solution here. Ideally we can use
auto
to not prescribe column widths. I was surprised to see that break the layout above.By the way, @worksofliam, you may want to check out this thread. I noticed some column header/cell alignment issues in your screenshot from the other day.
Thank you very much, I had indeed missed that. Added your suggestion and the columns are not mis-aligned, but I hope also that the columns could be auto size at some point, here is the new layout where some of the small columns retain too much space compared to other columns with large (description) content: