Merge pull request #394 from payloadcms/fix/393

fix: #393, ensures preview button gets up to date data
This commit is contained in:
James Mikrut
2021-12-14 10:27:58 -05:00
committed by GitHub

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,
},
});
}
};