Skip to content

Commit 70c2bd4

Browse files
onlyexeptiongeorgianastasovkdinev
authored
fix(skills): omit column widths by default in generated grid code (#17324)
* fix(skills): omit column widths by default in generated grid code (cherry picked from commit fd1dbfac8ea7530f39e205a718362309562e5ad5) * chore(*): address pr comments --------- Co-authored-by: Georgi Anastasov <48180072+georgianastasov@users.noreply.github.com> Co-authored-by: Konstantin Dinev <kdinev@infragistics.com>
1 parent e5e3fce commit 70c2bd4

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

skills/igniteui-angular-grids/references/sizing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,4 @@ igx-grid {
212212
- Use `null` for height only when the data set is small; row virtualization is disabled and large data will hurt performance.
213213
- When using percentage height, the parent **must** have an explicit height for the percentage to resolve correctly. Without it, the grid falls back to 10 visible rows.
214214
- A mix of fixed-width and auto-sized columns is valid — auto-sized columns fill the remaining space after fixed-width columns are laid out.
215+
- **Omit `width` on generated columns.** No `width` = columns equally share available grid width. Pixel widths leave empty space when their sum is less than the grid width. Only set `width` when the user explicitly asks for it. If column widths are used, at least one column must not have a specified width so that it fills the remaining space in the grid.

skills/igniteui-angular-grids/references/structure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ Events: `(rowSelectionChanging)`, `(columnSelectionChanging)`, `(selected)` (cel
263263
6. **Set `dataType` on every column** for correct filtering, sorting, editing, and summaries
264264
7. **Use signals** for data binding — `[data]="myData()"` with `signal<T[]>([])`
265265
8. **Virtualization is automatic** — don't wrap grids in virtual scroll containers
266+
9. **Omit `width` on generated `<igx-column>` elements.** Columns without `width` equally share available grid width. Only set `width` when the user explicitly asks for fixed or percentage column sizing. If column widths are used, at least one column must not have a specified width so that it fills the remaining space in the grid.
266267

267268
## See Also
268269

skills/igniteui-angular-grids/references/types.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Columns use `<igx-grid-lite-column>` with these inputs:
247247
| `field` | `string` | Data property key (required) |
248248
| `dataType` | `'string' \| 'number' \| 'boolean' \| 'date'` | Column data type |
249249
| `header` | `string` | Header text |
250-
| `width` | `string` | CSS width (e.g., `'250px'`) |
250+
| `width` | `string` | CSS width — omit by default; columns auto-fill available grid space. Only set when a fixed or percentage width is explicitly needed (e.g. `'20%'`). |
251251
| `hidden` | `boolean` | Hide the column |
252252
| `resizable` | `boolean` | Allow column resizing |
253253
| `sortable` | `boolean` | Enable sorting |
@@ -487,6 +487,7 @@ Provide a drag-and-drop UI for users to reshape the pivot interactively:
487487
2. **Hierarchical Grid**: sorting/filtering/paging are independent per level; configure features on the `<igx-row-island>` blueprint
488488
3. **Pivot Grid is read-only** — editing, paging, pinning, column moving, row dragging are all disabled; use `pivotConfiguration` for all data operations
489489
4. **Grid Lite requires `CUSTOM_ELEMENTS_SCHEMA`** and `igniteui-grid-lite` npm package — it has no editing, selection, paging, or export
490+
5. **Omit `width` on generated `<igx-grid-lite-column>` elements.** Columns without `width` equally share available grid width. Only set `width` when the user explicitly asks for it. If column widths are used, at least one column must not have a specified width so that it fills the remaining space in the grid.
490491

491492
## See Also
492493

0 commit comments

Comments
 (0)