Skip to content

Commit

Permalink
feat(schema-field): move transformer to json-schema package
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Jan 31, 2021
1 parent 36aef5b commit 69677e1
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 889 deletions.
9 changes: 2 additions & 7 deletions packages/antd/src/array-table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import { SelectProps } from 'antd/lib/select'
import cls from 'classnames'
import { SortableContainer, SortableElement } from 'react-sortable-hoc'
import { useForm, useField, observer } from '@formily/react'
import {
useSchema,
RecursionField,
transformSchemaToFieldProps,
} from '@formily/react-schema-field'
import { useSchema, RecursionField } from '@formily/react-schema-field'
import { FormPath, isArr, isBool } from '@formily/shared'
import { Schema } from '@formily/json-schema'
import { usePrefixCls } from '../__builtins__'
Expand Down Expand Up @@ -69,8 +65,7 @@ const useArrayTableSources = () => {
return []
const name = schema['x-component-props']?.['dataIndex'] || schema['name']
const field = arrayField.query(arrayField.address.concat(name)).take()
const fieldProps =
field?.props || transformSchemaToFieldProps(name, schema, {})
const fieldProps = field?.props || schema.toFieldProps()
const columnProps =
field?.component?.[1] || schema['x-component-props'] || {}
const display = field?.display || schema['x-display']
Expand Down
3 changes: 2 additions & 1 deletion packages/json-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"mobx": "^6.0.3"
},
"dependencies": {
"@formily/shared":"^2.0.0-beta.3"
"@formily/core": "^2.0.0-beta.3",
"@formily/shared": "^2.0.0-beta.3"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 69677e1

Please sign in to comment.