mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:26:36 +00:00
fix: translation
This commit is contained in:
parent
0190c9ef69
commit
f576d8db6f
@ -1,16 +1,14 @@
|
|||||||
import { LoadingOutlined } from '@ant-design/icons';
|
import { LoadingOutlined } from '@ant-design/icons';
|
||||||
import { connect, mapProps, RecursionField, useFieldSchema, useField, observer } from '@formily/react';
|
import { RecursionField, connect, mapProps, observer, useField, useFieldSchema } from '@formily/react';
|
||||||
import { Button, Input } from 'antd';
|
import { Button, Input } from 'antd';
|
||||||
import _ from 'lodash';
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { ActionContext } from '../action';
|
import { useTranslation } from 'react-i18next';
|
||||||
import React, { useCallback, useMemo, useState, useEffect } from 'react';
|
import { CollectionProvider, useCollection } from '../../../collection-manager';
|
||||||
import { useFieldTitle } from '../../hooks';
|
import { useFieldTitle } from '../../hooks';
|
||||||
|
import { ActionContext } from '../action';
|
||||||
import { RemoteSelect, RemoteSelectProps } from '../remote-select';
|
import { RemoteSelect, RemoteSelectProps } from '../remote-select';
|
||||||
import { useInsertSchema } from './hooks';
|
import useServiceOptions, { useInsertSchema } from './hooks';
|
||||||
import useServiceOptions from './hooks';
|
|
||||||
import { useCollection } from '../../../collection-manager';
|
|
||||||
import schema from './schema';
|
import schema from './schema';
|
||||||
import { CollectionProvider } from '../../../collection-manager';
|
|
||||||
|
|
||||||
export type AssociationSelectProps<P = any> = RemoteSelectProps<P> & {
|
export type AssociationSelectProps<P = any> = RemoteSelectProps<P> & {
|
||||||
action?: string;
|
action?: string;
|
||||||
@ -28,7 +26,7 @@ const InternalAssociationSelect = observer((props: AssociationSelectProps) => {
|
|||||||
const isFilterForm = fieldSchema['x-designer'] === 'FormItem.FilterFormDesigner';
|
const isFilterForm = fieldSchema['x-designer'] === 'FormItem.FilterFormDesigner';
|
||||||
const isAllowAddNew = fieldSchema['x-add-new'];
|
const isAllowAddNew = fieldSchema['x-add-new'];
|
||||||
const insertAddNewer = useInsertSchema('AddNewer');
|
const insertAddNewer = useInsertSchema('AddNewer');
|
||||||
useFieldTitle();
|
const { t } = useTranslation();
|
||||||
const normalizeValues = useCallback(
|
const normalizeValues = useCallback(
|
||||||
(obj) => {
|
(obj) => {
|
||||||
if (!objectValue && typeof obj === 'object') {
|
if (!objectValue && typeof obj === 'object') {
|
||||||
@ -70,7 +68,7 @@ const InternalAssociationSelect = observer((props: AssociationSelectProps) => {
|
|||||||
setVisibleAddNewer(true);
|
setVisibleAddNewer(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Add new
|
{t('Add new')}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</Input.Group>
|
</Input.Group>
|
||||||
|
Loading…
Reference in New Issue
Block a user