fix: style issue when using long text as the title field in association fields (#5655)

This commit is contained in:
Katherine 2024-11-15 09:55:47 +08:00 committed by GitHub
parent f27df77573
commit 514a63edbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 8 deletions

View File

@ -65,6 +65,7 @@ const InternalRemoteSelect = withDynamicSchemaProps(
optionFilter,
dataSource: propsDataSource,
toOptionsItem = (value) => value,
popupMatchSelectWidth = false,
...others
} = props;
const dataSource = useDataSourceKey();
@ -245,7 +246,7 @@ const InternalRemoteSelect = withDynamicSchemaProps(
return (
<Select
open={open}
popupMatchSelectWidth={false}
popupMatchSelectWidth={popupMatchSelectWidth}
autoClearSearchValue
filterOption={false}
filterSort={null}

View File

@ -7,10 +7,10 @@
* For more information, please refer to: https://www.nocobase.com/agreement.
*/
import { RemoteSchemaComponent, AssociatedFields } from '@nocobase/client';
import { RemoteSchemaComponent, AssociationField } from '@nocobase/client';
import React, { useCallback } from 'react';
import { Outlet, useParams } from 'react-router-dom';
import { Button as MobileButton, Form as MobileForm, List as MobileList, Dialog as MobileDialog } from 'antd-mobile';
import { Button as MobileButton, Dialog as MobileDialog } from 'antd-mobile';
import { MobilePicker } from './components/MobilePicker';
import { MobileDateTimePicker } from './components/MobileDatePicker';
@ -20,11 +20,9 @@ const mobileComponents = {
DatePicker: MobileDateTimePicker,
UnixTimestamp: MobileDateTimePicker,
Modal: MobileDialog,
AssociatedFields: (
<div contentEditable="false">
<AssociatedFields />
</div>
),
AssociationField: (props) => {
return <AssociationField {...props} popupMatchSelectWidth={true} />;
},
};
export const MobilePage = () => {