| | |
| | | useNotify, |
| | | } from 'react-admin'; |
| | | import PropTypes from 'prop-types'; |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { useWatch, useFormContext, useForm, useFormState } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography, Tabs, Tab, } from '@mui/material'; |
| | | import * as Common from '@/utils/common'; |
| | | import { EDIT_MODE, REFERENCE_INPUT_PAGESIZE } from '@/config/setting'; |
| | |
| | | import TreeSelectInput from "@/page/components/TreeSelectInput"; |
| | | import request from '@/utils/request'; |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | | const { getValues } = useFormState(); |
| | | return ( |
| | | <Toolbar sx={{ justifyContent: 'space-between' }}> |
| | | <SaveButton /> |
| | |
| | | const MatnrEdit = () => { |
| | | const translate = useTranslate(); |
| | | const [value, setValue] = React.useState(0); |
| | | const form = useForm(); |
| | | |
| | | const notify = useNotify(); |
| | | const [dynamicFields, setDynamicFields] = useState([]); |
| | |
| | | if (code === 200) { |
| | | setDynamicFields(data || []) |
| | | |
| | | |
| | | } else { |
| | | notify(msg); |
| | | } |