x-ui-design 1.0.42 → 1.0.45
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/esm/types/types/form.d.ts +2 -1
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/id_ed25519_personal +7 -0
- package/id_ed25519_personal.pub +1 -0
- package/id_ed25519_second +7 -0
- package/id_ed25519_second.pub +1 -0
- package/lib/components/Form/Form.tsx +3 -1
- package/lib/types/form.ts +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentClass, FC, FormEvent, ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { ComponentClass, FC, FormEvent, type FormHTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { DefaultProps, RuleType, RuleTypes, SizeType, SyntheticBaseEvent } from '.';
|
|
3
3
|
import { OptionProps } from './select';
|
|
4
4
|
export type RuleRender = (form: FormInstance) => RuleObject;
|
|
@@ -47,6 +47,7 @@ export type FormProps = DefaultProps & {
|
|
|
47
47
|
errorFields: Pick<FieldError, 'errors' | 'name'>[];
|
|
48
48
|
}) => void;
|
|
49
49
|
scrollToFirstError?: boolean;
|
|
50
|
+
formProps?: FormHTMLAttributes<HTMLFormElement>;
|
|
50
51
|
};
|
|
51
52
|
export type FormItemProps = DefaultProps & {
|
|
52
53
|
name: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -1875,6 +1875,7 @@ const Form$1 = ({
|
|
|
1875
1875
|
onFieldsChange,
|
|
1876
1876
|
layout = 'horizontal',
|
|
1877
1877
|
scrollToFirstError = false,
|
|
1878
|
+
formProps,
|
|
1878
1879
|
...rest
|
|
1879
1880
|
}) => {
|
|
1880
1881
|
const internalForm = useForm({
|
|
@@ -1938,12 +1939,12 @@ const Form$1 = ({
|
|
|
1938
1939
|
}, [rest.size, layout]);
|
|
1939
1940
|
return /*#__PURE__*/React.createElement(FormContext.Provider, {
|
|
1940
1941
|
value: formInstance
|
|
1941
|
-
}, /*#__PURE__*/React.createElement("form", {
|
|
1942
|
+
}, /*#__PURE__*/React.createElement("form", _extends({}, formProps, {
|
|
1942
1943
|
style: style,
|
|
1943
1944
|
ref: formRef,
|
|
1944
1945
|
onSubmit: handleSubmit,
|
|
1945
1946
|
className: `${prefixCls} ${prefixClsV3} ${className}`
|
|
1946
|
-
}, Children.map(childrenList, injectPropsIntoFinalLeaf)));
|
|
1947
|
+
}), Children.map(childrenList, injectPropsIntoFinalLeaf)));
|
|
1947
1948
|
};
|
|
1948
1949
|
Form$1.Item = FormItem$1;
|
|
1949
1950
|
|