@typeolymp/ui-components 1.3.1 → 1.3.2
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/build/index.js
CHANGED
|
@@ -1056,8 +1056,8 @@ var PasswordInputField = function (props) {
|
|
|
1056
1056
|
props.onChange(props.name, value);
|
|
1057
1057
|
};
|
|
1058
1058
|
var onKeyPress = function (e) {
|
|
1059
|
-
if (e.key === "Enter" && props.
|
|
1060
|
-
props.
|
|
1059
|
+
if (e.key === "Enter" && props.onKeyPress) {
|
|
1060
|
+
props.onKeyPress(e);
|
|
1061
1061
|
}
|
|
1062
1062
|
};
|
|
1063
1063
|
var onBlur = function () {
|
|
@@ -1346,7 +1346,7 @@ var Form = function (props) {
|
|
|
1346
1346
|
jsxRuntime.jsx(InputField, __assign({}, field, { onChange: onChangeFormField, onBlur: onBlurFormField }), void 0)));
|
|
1347
1347
|
case "password":
|
|
1348
1348
|
return (React.createElement(WithValidation, __assign({}, feedback[field.name], { key: "field-".concat(index) }),
|
|
1349
|
-
jsxRuntime.jsx(PasswordInputField, __assign({}, field, { onChange: onChangeFormField, onBlur: onBlurFormField,
|
|
1349
|
+
jsxRuntime.jsx(PasswordInputField, __assign({}, field, { onChange: onChangeFormField, onBlur: onBlurFormField, onKeyPress: field.submitOnEnter && onSubmit }), void 0)));
|
|
1350
1350
|
case "radio":
|
|
1351
1351
|
return (React.createElement(WithValidation, __assign({}, feedback[field.name], { key: "field-".concat(index) }),
|
|
1352
1352
|
jsxRuntime.jsx(RadioGroup, __assign({}, field, { onChange: onChangeFormField, onBlur: onBlurFormField }), void 0)));
|