@linzjs/step-ag-grid 7.17.0 → 7.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/Grid.d.ts +1 -0
- package/dist/src/utils/testUtil.d.ts +1 -0
- package/dist/step-ag-grid.esm.js +14 -3
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +2 -0
- package/src/stories/grid/GridPopoutBearing.stories.tsx +1 -0
- package/src/utils/testUtil.ts +11 -1
package/package.json
CHANGED
package/src/components/Grid.tsx
CHANGED
|
@@ -36,6 +36,7 @@ export interface GridProps {
|
|
|
36
36
|
rowSelection?: "single" | "multiple";
|
|
37
37
|
autoSelectFirstRow?: boolean;
|
|
38
38
|
onColumnMoved?: GridOptions["onColumnMoved"];
|
|
39
|
+
alwaysShowVerticalScroll?: boolean;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
/**
|
|
@@ -363,6 +364,7 @@ export const Grid = (params: GridProps): JSX.Element => {
|
|
|
363
364
|
postSortRows={params.postSortRows ?? postSortRows}
|
|
364
365
|
onSelectionChanged={synchroniseExternalStateToGridSelection}
|
|
365
366
|
onColumnMoved={params.onColumnMoved}
|
|
367
|
+
alwaysShowVerticalScroll={params.alwaysShowVerticalScroll}
|
|
366
368
|
/>
|
|
367
369
|
</div>
|
|
368
370
|
);
|
package/src/utils/testUtil.ts
CHANGED
|
@@ -78,7 +78,7 @@ export const editCell = async (rowId: number | string, colId: string, within?: H
|
|
|
78
78
|
|
|
79
79
|
export const isCellReadOnly = async (rowId: number | string, colId: string, within?: HTMLElement): Promise<boolean> => {
|
|
80
80
|
const cell = await findCell(rowId, colId, within);
|
|
81
|
-
return cell.className.includes("GridCell-
|
|
81
|
+
return cell.className.includes("GridCell-readonly");
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
const findOpenMenu = async (): Promise<HTMLElement> => findQuick({ classes: ".szh-menu--state-open" });
|
|
@@ -132,6 +132,16 @@ export const openAndClickMenuOption = async (
|
|
|
132
132
|
await clickMenuOption(menuOptionText);
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
+
export const openAndFindMenuOption = async (
|
|
136
|
+
rowId: number | string,
|
|
137
|
+
colId: string,
|
|
138
|
+
menuOptionText: string | RegExp,
|
|
139
|
+
within?: HTMLElement,
|
|
140
|
+
): Promise<HTMLElement> => {
|
|
141
|
+
await editCell(rowId, colId, within);
|
|
142
|
+
return await findMenuOption(menuOptionText);
|
|
143
|
+
};
|
|
144
|
+
|
|
135
145
|
export const getMultiSelectOptions = async () => {
|
|
136
146
|
const openMenu = await findOpenMenu();
|
|
137
147
|
return getAllQuick<HTMLInputElement>({ role: "menuitem", child: { tagName: "input,textarea" } }, openMenu).map(
|