Skip to content

Commit

Permalink
fix: 修复tabs 内的表单项无法设置 static 属性的问题 (#6136)
Browse files Browse the repository at this point in the history
Co-authored-by: jinye <jinye@baidu.com>
  • Loading branch information
CheshireJCat and jinye committed Feb 8, 2023
1 parent ad57d0e commit 446bdee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/amis-core/src/renderers/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ export default class Form extends React.Component<FormProps, object> {
dispatchEvent,
labelAlign,
labelWidth,
static: isStatic = false
static: isStatic
} = props;

const subProps = {
Expand Down Expand Up @@ -1563,7 +1563,8 @@ export default class Form extends React.Component<FormProps, object> {
* 2. 表单子项 static: false 或 不配置,跟随父表单
* 3. 动作控制 表单子项 时,无视配置,优先级最高
*/
static: (control as Schema).static || isStatic,
...(control as Schema).static || isStatic
? {static: true} : {},
btnDisabled: disabled || form.loading || form.validating,
onAction: this.handleAction,
onQuery: this.handleQuery,
Expand Down

0 comments on commit 446bdee

Please sign in to comment.