Skip to content

fix: 当form.getData()的时候,引发hook执行,其有可能修改form的数据,所以需要等到flush之后再获取值才能保证正确。#11825

Closed
shakaray wants to merge 1 commit intobaidu:masterfrom
shakaray:fix-form-getData
Closed

fix: 当form.getData()的时候,引发hook执行,其有可能修改form的数据,所以需要等到flush之后再获取值才能保证正确。#11825
shakaray wants to merge 1 commit intobaidu:masterfrom
shakaray:fix-form-getData

Conversation

@shakaray
Copy link
Copy Markdown
Contributor

@shakaray shakaray commented Apr 8, 2025

What

Why

How

@github-actions github-actions Bot added the fix label Apr 8, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2025

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@2betop
Copy link
Copy Markdown
Member

2betop commented Apr 10, 2025

这个方法估计有不少人用了,现在调整后返回变成 promise 了,担心对业务有影响,建议加个方法叫 asynGetValues 之类的

@2betop
Copy link
Copy Markdown
Member

2betop commented Apr 11, 2025

其实目前不改外部也能控制比如

await form.flush();
form.getValues()

@shakaray shakaray closed this Apr 13, 2025
@shakaray shakaray deleted the fix-form-getData branch April 13, 2025 11:47
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.

2 participants