fix(association-select): data scope
This commit is contained in:
parent
e18bccd00a
commit
fa0951171a
@ -4,7 +4,8 @@ import { useCollection, useCollectionManager } from '../../../collection-manager
|
||||
import { useRecord } from '../../../record-provider';
|
||||
|
||||
export default function useServiceOptions(props) {
|
||||
const { action = 'list', service, params, value } = props;
|
||||
const { action = 'list', service, value } = props;
|
||||
const params = service?.params || {};
|
||||
const fieldSchema = useFieldSchema();
|
||||
const { getField } = useCollection();
|
||||
const { getCollectionFields } = useCollectionManager();
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { LoadingOutlined } from '@ant-design/icons';
|
||||
import { connect, mapProps, mapReadPretty } from '@formily/react';
|
||||
import { SelectProps } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, { useMemo } from 'react';
|
||||
import { ResourceActionOptions, useRequest } from '../../../api-client';
|
||||
import { useCompile } from '../../hooks';
|
||||
|
@ -77,8 +77,9 @@ const InternalSelect = connect(
|
||||
}
|
||||
return v;
|
||||
};
|
||||
console.log('props', props);
|
||||
if (objectValue) {
|
||||
return <ObjectSelect {...others} mode={mode} />;
|
||||
return <ObjectSelect {...others} value={toValue(value)} mode={mode} />;
|
||||
}
|
||||
return (
|
||||
<AntdSelect
|
||||
|
Loading…
Reference in New Issue
Block a user