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: handleFormValues 不再将所有空字符串转换为undefined #3496

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

nullcache
Copy link

@nullcache nullcache commented Jan 2, 2024

handleFormValues 在获取 fields 时调用,判断字段为空字符串时会转换为 undefined,但这样就无法将有内容的字符串修改为空字符串值,因为 json 序列化会忽略 undefined 字段
之前这里的修改是 为了重置表单时移除URL中的参数 #2559
在 resetFields 里调用的 getDefaultValue 里把 input 默认值设置为 undefined 一样可以实现

@likui628 likui628 merged commit 6fbb576 into vbenjs:main Jan 2, 2024
2 checks passed
@vbenjs vbenjs locked and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants