mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 05:19:51 +00:00
4.8.10 test (#2578)
* fix: auth error * perf: refresh members * fix: variable run * fix: runtime check * fix: dataset info show
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Box, Flex, Input } from '@chakra-ui/react';
|
||||
import { delDatasetById } from '@/web/core/dataset/api';
|
||||
@@ -50,7 +50,7 @@ const Info = ({ datasetId }: { datasetId: string }) => {
|
||||
DatasetPageContext,
|
||||
(v) => v.refetchDatasetTraining
|
||||
);
|
||||
const { setValue, register, handleSubmit, watch } = useForm<DatasetItemType>({
|
||||
const { setValue, register, handleSubmit, watch, reset } = useForm<DatasetItemType>({
|
||||
defaultValues: datasetDetail
|
||||
});
|
||||
|
||||
@@ -147,6 +147,10 @@ const Info = ({ datasetId }: { datasetId: string }) => {
|
||||
errorToast: t('common:common.Update Failed')
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
reset(datasetDetail);
|
||||
}, [datasetDetail._id]);
|
||||
|
||||
return (
|
||||
<Box w={'100%'} h={'100%'} p={6}>
|
||||
<Box>
|
||||
|
Reference in New Issue
Block a user