309 have comment relation picker show up above the relation field (#332)
* Added a floating ui manual offset to have the dropdown on top of the relation box * Autofocus on dropdown search
This commit is contained in:
@ -168,7 +168,13 @@ export function CommentThreadRelationPicker({ commentThread }: OwnProps) {
|
|||||||
|
|
||||||
const { refs, floatingStyles } = useFloating({
|
const { refs, floatingStyles } = useFloating({
|
||||||
strategy: 'absolute',
|
strategy: 'absolute',
|
||||||
middleware: [offset(), flip(), size()],
|
middleware: [
|
||||||
|
offset(({ rects }) => {
|
||||||
|
return -rects.reference.height;
|
||||||
|
}),
|
||||||
|
flip(),
|
||||||
|
size(),
|
||||||
|
],
|
||||||
whileElementsMounted: autoUpdate,
|
whileElementsMounted: autoUpdate,
|
||||||
open: isMenuOpen,
|
open: isMenuOpen,
|
||||||
placement: 'bottom-start',
|
placement: 'bottom-start',
|
||||||
|
|||||||
@ -55,7 +55,11 @@ export function MultipleEntitySelect({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuSearch value={searchFilter} onChange={handleFilterChange} />
|
<DropdownMenuSearch
|
||||||
|
value={searchFilter}
|
||||||
|
onChange={handleFilterChange}
|
||||||
|
autoFocus
|
||||||
|
/>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItemContainer>
|
<DropdownMenuItemContainer>
|
||||||
{entitiesInDropdown?.map((entity) => (
|
{entitiesInDropdown?.map((entity) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user