mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 15:48:06 +00:00
fix: remoteSelect support data-source
This commit is contained in:
parent
bb93f68912
commit
4182140f13
@ -7,6 +7,8 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { ResourceActionOptions, useRequest } from '../../../api-client';
|
||||
import { useCollection, useCollectionManager } from '../../../collection-manager';
|
||||
import { mergeFilter } from '../../../filter-provider/utils';
|
||||
import { useDataSourceHeaders } from '../../../';
|
||||
import { useCollectionDataSourceName } from '../../../application/collection/CollectionDataSourceProvider';
|
||||
import { useCompile } from '../../hooks';
|
||||
import { Select, defaultFieldNames } from '../select';
|
||||
import { ReadPretty } from './ReadPretty';
|
||||
@ -41,6 +43,8 @@ const InternalRemoteSelect = connect(
|
||||
optionFilter,
|
||||
...others
|
||||
} = props;
|
||||
const dataSource = useCollectionDataSourceName();
|
||||
const headers = useDataSourceHeaders(dataSource);
|
||||
const [open, setOpen] = useState(false);
|
||||
const firstRun = useRef(false);
|
||||
const fieldSchema = useFieldSchema();
|
||||
@ -130,6 +134,7 @@ const InternalRemoteSelect = connect(
|
||||
{
|
||||
action: 'list',
|
||||
...service,
|
||||
headers,
|
||||
params: {
|
||||
pageSize: 200,
|
||||
...service?.params,
|
||||
|
Loading…
Reference in New Issue
Block a user