+ Current record state
+ {JSON.stringify(state.values, null, 2)}
+
+ );
+ }
console.debug("[form state]: ", state, "\n[form values]:", state.values);
+ return <>>;
+};
- return <>>
+FormikStateLogger.propTypes = {
+ render: PropTypes.bool,
};
+
+export default FormikStateLogger;
diff --git a/oarepo_ui/theme/assets/semantic-ui/js/oarepo_ui/forms/components/PreviewButton/PreviewButton.jsx b/oarepo_ui/theme/assets/semantic-ui/js/oarepo_ui/forms/components/PreviewButton/PreviewButton.jsx
new file mode 100644
index 00000000..a4d23ad6
--- /dev/null
+++ b/oarepo_ui/theme/assets/semantic-ui/js/oarepo_ui/forms/components/PreviewButton/PreviewButton.jsx
@@ -0,0 +1,24 @@
+import React from "react";
+import { Button } from "semantic-ui-react";
+import { i18next } from "@translations/oarepo_ui/i18next";
+import { useFormikContext } from "formik";
+
+export const PreviewButton = React.memo(({ ...uiProps }) => {
+ const { handleSubmit, isSubmitting } = useFormikContext();
+ return (
+