Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "update data grid styles to use subgrid.",
"packageName": "@adaptive-web/adaptive-web-components",
"email": "32497422+KingOfTac@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { css, ElementStyles } from "@microsoft/fast-element";
*/
export const templateStyles: ElementStyles = css`
:host {
grid-column: ${x => x.gridColumn ?? 0};
overflow: hidden;
white-space: nowrap;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
highlightStrokeReadableRest,
neutralFillSubtleRest,
} from "@adaptive-web/adaptive-ui/reference";
import type { FASTDataGridRow } from "@microsoft/fast-foundation";
import { heightNumber } from "../../styles/index.js";

/**
Expand All @@ -14,6 +15,9 @@ import { heightNumber } from "../../styles/index.js";
export const templateStyles: ElementStyles = css`
:host {
display: grid;
grid-template-columns: subgrid;
grid-column: 1 / span all;
grid-auto-flow: row;
width: 100%;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { css, ElementStyles } from "@microsoft/fast-element";
import { FASTDataGrid } from "@microsoft/fast-foundation";

/**
* Basic layout styling associated with the anatomy of the template.
* @public
*/
export const templateStyles: ElementStyles = css`
export const templateStyles: ElementStyles = css<FASTDataGrid>/* CSS */`
:host {
display: flex;
display: grid;
position: relative;
flex-direction: column;
grid-auto-flow: row;
grid-template-columns: repeat(${x => x.columnDefinitions?.length ?? 1}, 1fr);
}

:host([selection-mode="multi-row"]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ElementViewTemplate } from "@microsoft/fast-element";
import { dataGridTemplate, FASTDataGrid } from "@microsoft/fast-foundation";
import { ComponentAnatomy, Interactivity } from "@adaptive-web/adaptive-ui";
import { DesignSystem } from "../../design-system.js";
import { composeDataGridRow } from '../data-grid-row/index.js';
import { composeDataGridRow } from "../data-grid-row/index.js";

/**
* @public
Expand Down