chore: update creation form
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { useQueryDataList } from '@/hooks/use-query-data-list';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { useState } from 'react';
|
||||
import { queryDatasetList } from '../apis';
|
||||
import { DatasetListItem } from '../config/types';
|
||||
|
||||
const useQueryDataset = () => {
|
||||
const intl = useIntl();
|
||||
const { dataList, loading, fetchData, cancelRequest } = useQueryDataList<
|
||||
DatasetListItem,
|
||||
Global.SearchParams
|
||||
@@ -30,7 +32,7 @@ const useQueryDataset = () => {
|
||||
setDatasetList([
|
||||
...list,
|
||||
{
|
||||
label: 'Custom',
|
||||
label: intl.formatMessage({ id: 'backend.custom' }),
|
||||
value: 'Custom'
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useQueryData } from '@/hooks/use-query-data-list';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import _ from 'lodash';
|
||||
import { useState } from 'react';
|
||||
import { queryProfiles } from '../apis';
|
||||
@@ -11,6 +12,7 @@ export default function useQueryProfiles() {
|
||||
fetchDetail: queryProfiles,
|
||||
key: 'profiles'
|
||||
});
|
||||
const intl = useIntl();
|
||||
const [profilesOptions, setProfilesOptions] = useState<
|
||||
{
|
||||
label: string;
|
||||
@@ -35,7 +37,7 @@ export default function useQueryProfiles() {
|
||||
setProfilesOptions([
|
||||
...list,
|
||||
{
|
||||
label: 'Custom',
|
||||
label: intl.formatMessage({ id: 'backend.custom' }),
|
||||
value: 'Custom',
|
||||
config: {
|
||||
dataset_name: '',
|
||||
|
||||
Reference in New Issue
Block a user