repair: view brand device, add: read only
This commit is contained in:
@@ -30,28 +30,15 @@ const SolutionFieldNew = ({
|
||||
|
||||
const fileUpload = Form.useWatch(['solution_items', fieldKey, 'fileUpload'], form);
|
||||
const file = Form.useWatch(['solution_items', fieldKey, 'file'], form);
|
||||
|
||||
const getSolutionData = () => {
|
||||
try {
|
||||
return form.getFieldValue(['solution_items', fieldKey]) || {};
|
||||
} catch (error) {
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
const nameValue = Form.useWatch(['solution_items', fieldKey, 'name'], form);
|
||||
const typeValue = Form.useWatch(['solution_items', fieldKey, 'type'], form);
|
||||
const textValue = Form.useWatch(['solution_items', fieldKey, 'text'], form);
|
||||
const fileNameValue = Form.useWatch(['solution_items', fieldKey, 'fileName'], form);
|
||||
const statusValue = Form.useWatch(['solution_items', fieldKey, 'status'], form) ?? true;
|
||||
|
||||
const pathSolution = Form.useWatch(['solution_items', fieldKey, 'path_solution'], form);
|
||||
|
||||
const [deleteCounter, setDeleteCounter] = useState(0);
|
||||
|
||||
// Reset internal state when form is reset to initial values
|
||||
|
||||
React.useEffect(() => {
|
||||
// Check if form is in initial/reset state (name is empty)
|
||||
if (!nameValue || nameValue === '') {
|
||||
setCurrentFile(null);
|
||||
setIsDeleted(false);
|
||||
|
||||
Reference in New Issue
Block a user