Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

data-grid: narrow cells too wide with grid-template-columns #313

@WebFreak001

Description

@WebFreak001

Describe the bug

If cells are too narrow in width, the get sized up, causing issues with the total width of the grid.

To reproduce

Create a <vscode-data-grid> with grid-template-columns="1fr 40px 40px 40px" and css max-width: 400px on the parent of it

<div style="max-width: 400px">
	<vscode-data-grid aria-label="Source Paths"  grid-template-columns="1fr 40px 40px 40px">
		<vscode-data-grid-row row-type="header">
			<vscode-data-grid-cell cell-type="columnheader" grid-column="1">Source Path</vscode-data-grid-cell>
			<vscode-data-grid-cell cell-type="columnheader" grid-column="2">Import</vscode-data-grid-cell>
			<vscode-data-grid-cell cell-type="columnheader" grid-column="3">Source</vscode-data-grid-cell>
			<vscode-data-grid-cell cell-type="columnheader" grid-column="4">String Import</vscode-data-grid-cell>
		</vscode-data-grid-row>
		<vscode-data-grid-row>
			<vscode-data-grid-cell grid-column="1">a</vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="2"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="3"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="4"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
		</vscode-data-grid-row>
		<vscode-data-grid-row>
			<vscode-data-grid-cell grid-column="1">b</vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="2"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="3"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="4"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
		</vscode-data-grid-row>
		<vscode-data-grid-row>
			<vscode-data-grid-cell grid-column="1">c</vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="2"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="3"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
			<vscode-data-grid-cell grid-column="4"><vscode-checkbox></vscode-checkbox></vscode-data-grid-cell>
		</vscode-data-grid-row>
	</vscode-data-grid>
</div>

Expected behavior

the 3 columns should be 40 px in width, but is actually 96 px in width

Screenshots

screenshot

ui looking buggy

blue focus on first line goes over width of the container, hover on second line goes to the correct width

Desktop (please complete the following information):

  • OS Version: VSCode 1.62.0 on Electron 13.6.3 on ArchLinux i3 (X11)
  • Toolkit Version: v0.8.5

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions