Skip to content

Commit

Permalink
fix(formily): fix reactionSetters and playground
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Nov 13, 2021
1 parent c041167 commit 87971f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion formily/antd/playground/widgets/MarkupSchemaWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface IMarkupSchemaWidgetProps {
const transformToMarkupSchemaCode = (tree: TreeNode) => {
const printAttribute = (node: TreeNode) => {
if (!node) return ''
return `${Object.keys(node.props || {})
return `${Object.keys({ ...node.props, name: node.props.name || node.id })
.map((key) => {
if (
key === 'x-designable-id' ||
Expand Down
2 changes: 1 addition & 1 deletion formily/next/playground/widgets/MarkupSchemaWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface IMarkupSchemaWidgetProps {
const transformToMarkupSchemaCode = (tree: TreeNode) => {
const printAttribute = (node: TreeNode) => {
if (!node) return ''
return `${Object.keys(node.props || {})
return `${Object.keys({ ...node.props, name: node.props.name || node.id })
.map((key) => {
if (
key === 'x-designable-id' ||
Expand Down
4 changes: 2 additions & 2 deletions formily/setters/src/components/ReactionsSetter/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export const FieldProperties = [
helpCode: DataSourceHelper,
},
{
key: 'component[1]',
key: 'componentProps',
token: 'componentProps',
type: 'object',
helpCode: ComponentPropsHelper,
},
{
key: 'decorator[1]',
key: 'componentProps',
token: 'decoratorProps',
type: 'object',
helpCode: DecoratorPropsHelper,
Expand Down

0 comments on commit 87971f4

Please sign in to comment.