@jswork/react-ant-form-schema 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/react-ant-form-schema",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.esm.js",
6
6
  "types": "dist/main.d.ts",
package/src/index.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import cx from 'classnames';
2
2
  import React, { FC, ReactNode } from 'react';
3
- import { Form, FormProps, Spin } from 'antd';
3
+ import { Form, FormProps } from 'antd';
4
4
  import NiceForm, { NiceFormMeta } from '@ebay/nice-form-react';
5
5
  import { deepMerge } from './utils';
6
6
 
@@ -36,10 +36,6 @@ export type ReactAntdFormSchemaProps = {
36
36
  * The form content.
37
37
  */
38
38
  footerClassName?: string;
39
- /**
40
- * Form loading status.
41
- */
42
- loading?: boolean;
43
39
  } & FormProps;
44
40
 
45
41
  const defaultProps = {
@@ -47,11 +43,10 @@ const defaultProps = {
47
43
  header: null,
48
44
  footer: null,
49
45
  footerClassName: '',
50
- loading: false,
51
46
  };
52
47
 
53
48
  const ReactAntdFormSchema: FC<ReactAntdFormSchemaProps> = (props) => {
54
- const { className, meta, header, footer, children, loading, footerClassName, ...rest } = {
49
+ const { className, meta, header, footer, children, footerClassName, ...rest } = {
55
50
  ...defaultProps,
56
51
  ...props,
57
52
  };
@@ -61,16 +56,14 @@ const ReactAntdFormSchema: FC<ReactAntdFormSchemaProps> = (props) => {
61
56
 
62
57
  return (
63
58
  <Form data-component={CLASS_NAME} className={cx(CLASS_NAME, className)} {...rest}>
64
- <Spin spinning={loading}>
65
- {header}
66
- <NiceForm meta={_meta} />
67
- <Form.Item
68
- wrapperCol={{ offset: _offset }}
69
- className={footerClassName}
70
- style={{ marginBottom: 0 }}>
71
- {footerNode}
72
- </Form.Item>
73
- </Spin>
59
+ {header}
60
+ <NiceForm meta={_meta} />
61
+ <Form.Item
62
+ wrapperCol={{ offset: _offset }}
63
+ className={footerClassName}
64
+ style={{ marginBottom: 0 }}>
65
+ {footerNode}
66
+ </Form.Item>
74
67
  </Form>
75
68
  );
76
69
  };
package/src/main.tsx CHANGED
@@ -1,3 +1,5 @@
1
1
  import ReactAntdFormSchema from '.';
2
+ import { ReactAntdFormSchemaProps } from '.';
2
3
 
3
4
  export default ReactAntdFormSchema;
5
+ export type { ReactAntdFormSchemaProps };