fix: dropdownMatchSelectWidth: false

This commit is contained in:
chenos 2023-05-12 14:33:20 +08:00
parent 81b3afb57b
commit 901c05bc35
2 changed files with 5 additions and 2 deletions

View File

@ -1,8 +1,8 @@
import { LoadingOutlined } from '@ant-design/icons';
import { connect, mapProps, mapReadPretty, useFieldSchema, useField } from '@formily/react';
import { connect, mapProps, mapReadPretty, useField, useFieldSchema } from '@formily/react';
import { SelectProps, Tag } from 'antd';
import moment from 'moment';
import { uniqBy } from 'lodash';
import moment from 'moment';
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
import { ResourceActionOptions, useRequest } from '../../../api-client';
import { mergeFilter } from '../../../block-provider/SharedFilterProvider';
@ -191,6 +191,7 @@ const InternalRemoteSelect = connect(
return (
<Select
dropdownMatchSelectWidth={false}
autoClearSearchValue
filterOption={false}
filterSort={null}

View File

@ -41,6 +41,7 @@ const ObjectSelect = (props: Props) => {
options={options}
fieldNames={fieldNames}
showSearch
dropdownMatchSelectWidth={false}
filterOption={(input, option) => (option?.[fieldNames.label || 'label'] ?? '').includes(input)}
filterSort={(optionA, optionB) =>
(optionA?.[fieldNames.label || 'label'] ?? '')
@ -82,6 +83,7 @@ const InternalSelect = connect(
showSearch
filterOption={filterOption}
allowClear
dropdownMatchSelectWidth={false}
value={value}
{...others}
onChange={(changed) => {