Skip to content

Commit

Permalink
fix: fix docs throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Dec 5, 2023
1 parent d6f827c commit 588e5e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions docs/guide/advanced/controlled.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ const DYNAMIC_INJECT_SCHEMA = {
},
}

export default observer(() => {
const App = observer(() => {
const oldTypeRef = useRef()
const form = useMemo(() => createForm(), [])
const currentType = form.values.type
Expand Down Expand Up @@ -340,6 +340,8 @@ export default observer(() => {
</Form>
)
})

export default App
```

## Schema fragment linkage (custom component)
Expand Down Expand Up @@ -429,7 +431,7 @@ const DYNAMIC_INJECT_SCHEMA = {
},
}

export default observer(() => {
const App = observer(() => {
const form = useMemo(() => createForm(), [])
const schema = {
type: 'object',
Expand Down Expand Up @@ -457,6 +459,8 @@ export default observer(() => {
</Form>
)
})

export default App
```

## Field Level Control
Expand Down
8 changes: 6 additions & 2 deletions docs/guide/advanced/controlled.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ const DYNAMIC_INJECT_SCHEMA = {
},
}

export default observer(() => {
const App = observer(() => {
const oldTypeRef = useRef()
const form = useMemo(() => createForm(), [])
const currentType = form.values.type
Expand Down Expand Up @@ -340,6 +340,8 @@ export default observer(() => {
</Form>
)
})

export default App
```

## Schema 片段联动(自定义组件)
Expand Down Expand Up @@ -429,7 +431,7 @@ const DYNAMIC_INJECT_SCHEMA = {
},
}

export default observer(() => {
const App = observer(() => {
const form = useMemo(() => createForm(), [])
const schema = {
type: 'object',
Expand Down Expand Up @@ -457,6 +459,8 @@ export default observer(() => {
</Form>
)
})

export default App
```

## 字段级受控
Expand Down

0 comments on commit 588e5e5

Please sign in to comment.