mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 09:47:10 +00:00
fix(client): fix some warnings (#4143)
This commit is contained in:
parent
90144e32ce
commit
b0ba197915
@ -9,8 +9,12 @@ function notify(type, messages, instance) {
|
||||
return;
|
||||
}
|
||||
instance[type]({
|
||||
message: messages.map?.((item: any) => {
|
||||
return React.createElement('div', {}, typeof item === 'string' ? item : item.message);
|
||||
message: messages.map?.((item: any, index) => {
|
||||
return React.createElement(
|
||||
'div',
|
||||
{ key: `${index}_${item.message}` },
|
||||
typeof item === 'string' ? item : item.message,
|
||||
);
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import { RemoteSelect, RemoteSelectProps } from '../remote-select';
|
||||
import useServiceOptions, { useAssociationFieldContext } from './hooks';
|
||||
|
||||
export type AssociationSelectProps<P = any> = RemoteSelectProps<P> & {
|
||||
addMode?: 'quickAdd' | 'modalAdd';
|
||||
action?: string;
|
||||
multiple?: boolean;
|
||||
};
|
||||
@ -42,7 +43,7 @@ export const filterAnalyses = (filters): any[] => {
|
||||
|
||||
const InternalAssociationSelect = observer(
|
||||
(props: AssociationSelectProps) => {
|
||||
const { objectValue = true } = props;
|
||||
const { objectValue = true, addMode: propsAddMode, ...rest } = props;
|
||||
const field: any = useField();
|
||||
const fieldSchema = useFieldSchema();
|
||||
const service = useServiceOptions(props);
|
||||
@ -120,7 +121,7 @@ const InternalAssociationSelect = observer(
|
||||
<Space.Compact style={{ display: 'flex', lineHeight: '32px' }}>
|
||||
<RemoteSelect
|
||||
style={{ width: '100%' }}
|
||||
{...props}
|
||||
{...rest}
|
||||
size={'middle'}
|
||||
objectValue={objectValue}
|
||||
value={value || innerValue}
|
||||
|
Loading…
Reference in New Issue
Block a user