1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-17 22:47:59 +00:00

Merge pull request #7591 from haiwen/fix/dropdown_menu_position

fix dropdown menu position
This commit is contained in:
Michael An 2025-03-12 12:06:35 +08:00 committed by GitHub
commit 890183fe6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 65 additions and 64 deletions

View File

@ -189,8 +189,7 @@ const CustomDropdownMenu = ({ column, modifiers, onSelect }) => {
}, [onSelect]);
return (
<ModalPortal>
<DropdownMenu className="sf-metadata-column-type-dropdown-menu" modifiers={modifiers}>
<DropdownMenu className="sf-metadata-column-type-dropdown-menu" modifiers={modifiers} style={{ zIndex: 1061 }}>
<div className="search-column-container">
<Input onChange={onSearchColumn} placeholder={gettext('Search properties')} value={searchValue} onClick={onSearchClick} ref={inputRef} />
</div>
@ -226,7 +225,7 @@ const CustomDropdownMenu = ({ column, modifiers, onSelect }) => {
<span className="mr-auto">{gettext('Custom properties')}</span>
<i className="sf3-font-down sf3-font rotate-270"></i>
</DropdownToggle>
<DropdownMenu container="body" style={{ zIndex: 1061 }}>
<DropdownMenu>
{basicsColumns.map((item, index) => (
<DropdownItem
key={index}
@ -244,7 +243,6 @@ const CustomDropdownMenu = ({ column, modifiers, onSelect }) => {
</>
)}
</DropdownMenu>
</ModalPortal>
);
};

View File

@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import classnames from 'classnames';
import { gettext } from '../../../../../utils/constants';
import CustomDropdownMenu from '../dropdown-menu';
import ModalPortal from '../../../../../components/modal-portal';
import './index.css';
@ -54,6 +55,7 @@ const Type = forwardRef(({ column, onChange }, ref) => {
<span className="mr-auto">{column.name}</span>
<i className="sf3-font sf3-font-down" aria-hidden="true"></i>
</DropdownToggle>
<ModalPortal>
<CustomDropdownMenu
column={column}
modifiers={[{
@ -64,6 +66,7 @@ const Type = forwardRef(({ column, onChange }, ref) => {
}]}
onSelect={onChange}
/>
</ModalPortal>
</Dropdown>
{error && (<FormFeedback>{error}</FormFeedback>)}
</FormGroup>