简体   繁体   English

如何在react-final-form中恢复formState

[英]How to restore formState in react-final-form

I have a simple form with usage react-final-form .我有一个简单的表单,使用react-final-form This form automatically saved each time when values changed.每次更改values时都会自动保存此表单。 When the user reloads the page for some reason, the form gets initialValues from the previous saved values.当用户出于某种原因重新加载页面时,表单会从之前保存的值中获取 initialValues。 Its work well, but meta.pristine and other properties from meta not saved.它工作得很好,但是meta.pristine和其他来自meta属性没有保存。 Is it possible to restore formState in react-final-form ?是否可以在react-final-form恢复formState

You want a thing that persists all the form state across refreshes?你想要一个在刷新时保持所有表单状态的东西吗? I've been maintaining form libs for years and I hadn't heard of this feature request.我多年来一直在维护表单库,但我没有听说过这个功能请求。 This is, of course, not the way The Web normally works.当然,这不是 The Web 通常的工作方式。 Seems possible , but it will require some more thought.似乎有可能,但这需要更多的思考。 Submit an issue to Final Form requesting this.向最终表格提交一个问题,要求这样做。

The official answer as of the time of this post is: No, this is not supported yet.截至本文发布时,官方答复是:不,尚不支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM