Skip to content

Commit

Permalink
fix(antd/next): onChange does not work when no formTab instance is pa…
Browse files Browse the repository at this point in the history
…ssed (#3388)
  • Loading branch information
darkmice authored Sep 12, 2022
1 parent 053e0f0 commit e4ba3ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/antd/src/form-tab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const FormTab: ComposedFormTab = observer(
activeKey={activeKey}
onChange={(key) => {
props.onChange?.(key)
formTab?.setActiveKey?.(key)
_formTab?.setActiveKey?.(key)
}}
>
{tabs.map(({ props, schema, name }, key) => (
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/form-tab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const FormTab: ComposedFormTab = observer(
className={cls(prefixCls, props.className)}
onChange={(key) => {
props.onChange?.(key)
formTab?.setActiveKey?.(key)
_formTab?.setActiveKey?.(key)
}}
lazyLoad={false}
>
Expand Down

0 comments on commit e4ba3ea

Please sign in to comment.