fix: #393, ensures preview button gets up to date data

This commit is contained in:
James
2021-12-14 10:10:13 -05:00
parent 37f5fc3895
commit 2f47e39a9f

View File

@@ -48,6 +48,12 @@ const EditView: React.FC<IndexProps> = (props) => {
} else {
const state = await buildStateFromSchema(fields, json.doc);
setInitialState(state);
history.push({
state: {
data: json.doc,
},
});
}
};