fix: default benchmark form values

This commit is contained in:
jialin
2026-02-02 14:10:46 +08:00
parent fc599a0637
commit f651ab7fd9
15 changed files with 188 additions and 53 deletions
-9
View File
@@ -37,12 +37,9 @@ const ProviderForm: React.FC<ProviderFormProps> = forwardRef((props, ref) => {
const { action, currentData, onFinish, open, clusterList } = props;
const intl = useIntl();
const [form] = Form.useForm();
const profile = Form.useWatch('profile', form);
const { getScrollElementScrollableHeight } = useWrapperContext();
const [activeKey, setActiveKey] = useState<string[]>([TABKeysMap.PROFILE]);
const scrollTabsRef = useRef<any>(null);
const showAdvanced = profile !== 'Custom' && Boolean(profile);
const segmentOptions = [
{
@@ -88,12 +85,6 @@ const ProviderForm: React.FC<ProviderFormProps> = forwardRef((props, ref) => {
}
}, [form, currentData, action]);
useEffect(() => {
if (!showAdvanced && activeKey?.includes(TABKeysMap.ADVANCED)) {
setActiveKey([TABKeysMap.PROFILE]);
}
}, [showAdvanced, activeKey]);
return (
<ScrollSpyTabs
ref={scrollTabsRef}