@sebgroup/green-react 1.12.1 → 1.12.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/index.js +8 -2
- package/package.json +3 -3
- package/src/lib/form/formItems.d.ts +2 -1
package/index.js
CHANGED
|
@@ -2645,8 +2645,9 @@ const Form = props => {
|
|
|
2645
2645
|
|
|
2646
2646
|
const FormItems = ({
|
|
2647
2647
|
children,
|
|
2648
|
+
name,
|
|
2648
2649
|
validate,
|
|
2649
|
-
|
|
2650
|
+
onChange: _onFormItemsChanged
|
|
2650
2651
|
}) => {
|
|
2651
2652
|
const {
|
|
2652
2653
|
setValues,
|
|
@@ -2711,7 +2712,12 @@ const FormItems = ({
|
|
|
2711
2712
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
2712
2713
|
validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
|
|
2713
2714
|
name,
|
|
2714
|
-
onChange
|
|
2715
|
+
onChange: event => {
|
|
2716
|
+
if (typeof _onFormItemsChanged === 'function') {
|
|
2717
|
+
_onFormItemsChanged(event);
|
|
2718
|
+
}
|
|
2719
|
+
onChange(event);
|
|
2720
|
+
}
|
|
2715
2721
|
});
|
|
2716
2722
|
};
|
|
2717
2723
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^17 || ^18",
|
|
6
6
|
"react-dom": "^17 || ^18"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@sebgroup/chlorophyll": "^1.11.
|
|
10
|
-
"@sebgroup/extract": "^1.4.
|
|
9
|
+
"@sebgroup/chlorophyll": "^1.11.4",
|
|
10
|
+
"@sebgroup/extract": "^1.4.1",
|
|
11
11
|
"classnames": "^2.3.2"
|
|
12
12
|
},
|
|
13
13
|
"description": "React components built on top of @sebgroup/chlorophyll.",
|
|
@@ -2,8 +2,9 @@ import { IValidator } from '@sebgroup/extract';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export interface FormItemsProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
validate?: IValidator;
|
|
6
5
|
name: string;
|
|
6
|
+
validate?: IValidator;
|
|
7
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
7
8
|
}
|
|
8
9
|
export declare const FormItems: React.FC<FormItemsProps>;
|
|
9
10
|
export default FormItems;
|