@linzjs/step-ag-grid 7.11.5 → 7.11.7
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 +28 -4
- package/dist/index.js.map +1 -1
- package/dist/step-ag-grid.esm.js +28 -4
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid.tsx +12 -0
- package/src/components/gridHeader/GridHeaderSelect.tsx +3 -3
- package/src/contexts/GridContextProvider.tsx +13 -2
- package/src/react-menu3/README.md +1 -0
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +8 -3
- package/src/utils/bearing.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -2166,7 +2166,18 @@ var GridContextProvider = function (props) {
|
|
|
2166
2166
|
}
|
|
2167
2167
|
var rowsThatNeedSelecting = lodashEs.sortBy(rowNodes.filter(function (node) { return !node.isSelected(); }), function (node) { return node.data.id; });
|
|
2168
2168
|
var firstNode = rowsThatNeedSelecting[0];
|
|
2169
|
-
|
|
2169
|
+
if (firstNode) {
|
|
2170
|
+
gridApi.ensureNodeVisible(firstNode);
|
|
2171
|
+
var colDefs = gridApi.getColumnDefs();
|
|
2172
|
+
if (colDefs && colDefs.length) {
|
|
2173
|
+
var col = colDefs[0]; // We don't support ColGroupDef
|
|
2174
|
+
var rowIndex_1 = firstNode.rowIndex;
|
|
2175
|
+
if (rowIndex_1 != null && col != null) {
|
|
2176
|
+
var colId_1 = col.colId;
|
|
2177
|
+
colId_1 != null && setTimeout(function () { return gridApi.setFocusedCell(rowIndex_1, colId_1); }, 100);
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2170
2181
|
if (select) {
|
|
2171
2182
|
// Select rows that shouldn't be selected
|
|
2172
2183
|
rowsThatNeedSelecting.forEach(function (node) { return node.setSelected(true); });
|
|
@@ -2689,9 +2700,9 @@ var GridHeaderSelect = function (_a) {
|
|
|
2689
2700
|
// This is used to force an update on selection change
|
|
2690
2701
|
var _b = React.useState(0), updateCounter = _b[0], setUpdateCounter = _b[1];
|
|
2691
2702
|
var selectedNodeCount = api.getSelectedRows().length;
|
|
2692
|
-
var clickHandler =
|
|
2703
|
+
var clickHandler = function () {
|
|
2693
2704
|
setUpdateCounter(updateCounter + 1);
|
|
2694
|
-
}
|
|
2705
|
+
};
|
|
2695
2706
|
React.useEffect(function () {
|
|
2696
2707
|
api.addEventListener("selectionChanged", clickHandler);
|
|
2697
2708
|
return function () { return api.removeEventListener("selectionChanged", clickHandler); };
|
|
@@ -2833,6 +2844,19 @@ var Grid = function (params) {
|
|
|
2833
2844
|
suppressSizeToFit: true,
|
|
2834
2845
|
checkboxSelection: true,
|
|
2835
2846
|
headerComponent: GridHeaderSelect,
|
|
2847
|
+
suppressHeaderKeyboardEvent: function (e) {
|
|
2848
|
+
if (e.event.key === "Enter" && !e.event.repeat) {
|
|
2849
|
+
var selectedNodeCount = e.api.getSelectedRows().length;
|
|
2850
|
+
if (selectedNodeCount == 0) {
|
|
2851
|
+
e.api.selectAllFiltered();
|
|
2852
|
+
}
|
|
2853
|
+
else {
|
|
2854
|
+
e.api.deselectAll();
|
|
2855
|
+
}
|
|
2856
|
+
return false;
|
|
2857
|
+
}
|
|
2858
|
+
return true;
|
|
2859
|
+
},
|
|
2836
2860
|
onCellClicked: clickSelectorCheckboxWhenContainingCellClicked
|
|
2837
2861
|
}
|
|
2838
2862
|
], adjustColDefs, true) : adjustColDefs;
|
|
@@ -4010,7 +4034,7 @@ var bearingStringValidator = function (value, customInvalid) {
|
|
|
4010
4034
|
return null;
|
|
4011
4035
|
var match = value.match(validMaskForDmsBearing);
|
|
4012
4036
|
if (!match)
|
|
4013
|
-
return "Bearing must be a
|
|
4037
|
+
return "Bearing must be a number in D.MMSSS format";
|
|
4014
4038
|
var decimalPart = match[4];
|
|
4015
4039
|
if (decimalPart != null && decimalPart.length > 5) {
|
|
4016
4040
|
return "Bearing has a maximum of 5 decimal places";
|