@linzjs/step-ag-grid 2.4.9 → 2.4.11
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 +15 -6
- package/dist/index.js.map +1 -1
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +2 -2
- package/dist/step-ag-grid.esm.js +15 -6
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridForm/GridFormDropDown.tsx +11 -3
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +8 -4
package/dist/index.js
CHANGED
|
@@ -3089,15 +3089,20 @@ var GridFormDropDown = function (_props) {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
setSubComponentValues(localSubComponentValues);
|
|
3091
3091
|
},
|
|
3092
|
-
keyDown: function (key) {
|
|
3092
|
+
keyDown: function (key, event) {
|
|
3093
3093
|
var subComponentItem = subComponentValues.find(function (_a) {
|
|
3094
3094
|
var optionValue = _a.optionValue;
|
|
3095
3095
|
return optionValue === item.value;
|
|
3096
3096
|
});
|
|
3097
3097
|
if ((key === "Enter" || key === "Tab") && subComponentItem) {
|
|
3098
|
-
|
|
3099
|
-
|
|
3098
|
+
event.preventDefault();
|
|
3099
|
+
event.stopPropagation();
|
|
3100
|
+
return selectItemHandler(item.value, subComponentItem.subComponentValue).then(function () {
|
|
3101
|
+
ref.closeMenu();
|
|
3102
|
+
return true;
|
|
3103
|
+
});
|
|
3100
3104
|
}
|
|
3105
|
+
return false;
|
|
3101
3106
|
},
|
|
3102
3107
|
key: "".concat(props.field, "-").concat(index, "_subcomponent_inner")
|
|
3103
3108
|
}, ref);
|
|
@@ -3742,13 +3747,17 @@ var GridFormSubComponentTextInput = function (_a) {
|
|
|
3742
3747
|
var _b = react.useState(""), inputValue = _b[0], setInputValue = _b[1];
|
|
3743
3748
|
return (jsxRuntime.jsxs("div", __assign({ style: {
|
|
3744
3749
|
display: "flex",
|
|
3745
|
-
flexDirection: "column"
|
|
3750
|
+
flexDirection: "column",
|
|
3751
|
+
width: "100%",
|
|
3752
|
+
padding: 0
|
|
3746
3753
|
} }, { children: [jsxRuntime.jsx(TextInputFormatted, { className: inputClass, value: inputValue, onChange: function (e) {
|
|
3747
3754
|
var value = e.target.value;
|
|
3748
3755
|
setValue(value);
|
|
3749
3756
|
setInputValue(value);
|
|
3750
3757
|
}, inputProps: {
|
|
3751
|
-
onKeyDown: function (
|
|
3758
|
+
onKeyDown: function (e) {
|
|
3759
|
+
return keyDown(e.key, e);
|
|
3760
|
+
},
|
|
3752
3761
|
placeholder: placeholderText,
|
|
3753
3762
|
onMouseEnter: function (e) {
|
|
3754
3763
|
if (document.activeElement != e.currentTarget) {
|
|
@@ -3759,7 +3768,7 @@ var GridFormSubComponentTextInput = function (_a) {
|
|
|
3759
3768
|
width: "100%"
|
|
3760
3769
|
}
|
|
3761
3770
|
} }), jsxRuntime.jsx("span", __assign({ style: {
|
|
3762
|
-
fontSize: "0.
|
|
3771
|
+
fontSize: "0.7rem"
|
|
3763
3772
|
} }, { children: helpText }))] })));
|
|
3764
3773
|
};
|
|
3765
3774
|
|