@linzjs/step-ag-grid 7.9.0 → 7.10.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/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/src/components/Grid.d.ts +1 -0
- package/dist/step-ag-grid.esm.js +6 -6
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +2 -1
- package/src/stories/grid/GridPopoutBearing.stories.tsx +1 -1
- package/src/stories/grid/GridReadOnly.stories.tsx +2 -1
- package/src/utils/bearing.ts +1 -1
package/package.json
CHANGED
package/src/components/Grid.tsx
CHANGED
|
@@ -33,6 +33,7 @@ export interface GridProps {
|
|
|
33
33
|
postSortRows?: GridOptions["postSortRows"];
|
|
34
34
|
animateRows?: boolean;
|
|
35
35
|
rowClassRules?: GridOptions["rowClassRules"];
|
|
36
|
+
rowSelection?: "single" | "multiple";
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -273,7 +274,7 @@ export const Grid = (params: GridProps): JSX.Element => {
|
|
|
273
274
|
defaultColDef={params.defaultColDef}
|
|
274
275
|
getRowId={(params) => `${params.data.id}`}
|
|
275
276
|
suppressRowClickSelection={true}
|
|
276
|
-
rowSelection={"multiple"}
|
|
277
|
+
rowSelection={params.rowSelection ?? "multiple"}
|
|
277
278
|
suppressBrowserResizeObserver={true}
|
|
278
279
|
colResizeDefault={"shift"}
|
|
279
280
|
onFirstDataRendered={sizeColumnsToFit}
|
|
@@ -88,7 +88,7 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
88
88
|
{ id: 1001, bearing: "0E-12", bearingCorrection: 240 },
|
|
89
89
|
{ id: 1002, bearing: null, bearingCorrection: 355.1 },
|
|
90
90
|
{ id: 1003, bearing: null, bearingCorrection: 0 },
|
|
91
|
-
{ id: 1004, bearing: 5.0, bearingCorrection:
|
|
91
|
+
{ id: 1004, bearing: 5.0, bearingCorrection: "1.00500" },
|
|
92
92
|
] as ITestRow[]);
|
|
93
93
|
|
|
94
94
|
return (
|
|
@@ -204,8 +204,9 @@ const GridReadOnlyTemplate: ComponentStory<typeof Grid> = (props: GridProps) =>
|
|
|
204
204
|
columnDefs={columnDefs}
|
|
205
205
|
rowData={rowData}
|
|
206
206
|
domLayout={"autoHeight"}
|
|
207
|
+
rowSelection={"single"}
|
|
207
208
|
/>
|
|
208
209
|
);
|
|
209
210
|
};
|
|
210
211
|
|
|
211
|
-
export const
|
|
212
|
+
export const ReadOnlySingleSelection = GridReadOnlyTemplate.bind({});
|
package/src/utils/bearing.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const bearingCorrectionValueFormatter = (params: ValueFormatterParams): s
|
|
|
14
14
|
return "–";
|
|
15
15
|
}
|
|
16
16
|
if (typeof value === "string") {
|
|
17
|
-
return convertDDToDMS(bearingNumberParser(value), true,
|
|
17
|
+
return convertDDToDMS(bearingNumberParser(value), true, false);
|
|
18
18
|
}
|
|
19
19
|
return convertDDToDMS(value, true, false);
|
|
20
20
|
};
|