@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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "7.9.0",
5
+ "version": "7.10.0",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -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: 50.0 },
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 ReadOnly = GridReadOnlyTemplate.bind({});
212
+ export const ReadOnlySingleSelection = GridReadOnlyTemplate.bind({});
@@ -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, true);
17
+ return convertDDToDMS(bearingNumberParser(value), true, false);
18
18
  }
19
19
  return convertDDToDMS(value, true, false);
20
20
  };