Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: can't set default value when turn on the form field required #1887

Merged
merged 3 commits into from
May 22, 2023

Conversation

aotemj
Copy link
Contributor

@aotemj aotemj commented May 18, 2023

Description (Bug 描述)

表单中字段设置默认值缺陷

Steps to reproduce (复现步骤)

表单中字段右上角先启用必填,再设置默认值,无法确认保存

Expected behavior (预期行为)

表单中字段右上角先启用必填,再设置默认值,能够正常保存

Actual behavior (实际行为)

表单中字段右上角先启用必填,再设置默认值,无法确认保存

Related issues (相关 issue)

Reason (原因)

当前的设置表单默认值modal 里复用了 当前form field 的required 属性值,当将 form field 的必填属性打开时, 设置表单modal 默认值的modal里面的默认值 form field 也变成了必填选项

Solution (解决方案)

在赋值 schema的时候去掉对 required 属性的复用

@chenos chenos merged commit db349cc into nocobase:main May 22, 2023
4 checks passed
Dunqing pushed a commit that referenced this pull request May 23, 2023
)

* fix: can't set default value when turn on the form field required

* fix: can't set default value when turn on the association select field required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants