Skip to content

Commit

Permalink
fix: #266 set search result as absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
alexphiev committed Dec 12, 2024
1 parent 4fd4016 commit 1676baf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frontend/components/core/command/vessel-finder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function VesselFinderDemo({ wideMode, setWideMode }: Props) {

return (
<Command
className={`border-[0.5px] border-solid ${!wideMode ? "cursor-pointer hover:border-primary hover:text-primary" : "cursor-default"}`}
className={`relative overflow-visible border-[0.5px] border-solid ${!wideMode ? "cursor-pointer hover:border-primary hover:text-primary" : "cursor-default"}`}
onClick={() => {
if (!wideMode) {
setWideMode(true)
Expand All @@ -129,6 +129,7 @@ export function VesselFinderDemo({ wideMode, setWideMode }: Props) {
placeholder="Type MMSI, IMO or vessel name to search..."
/>
<CommandList
className="absolute left-0 top-[calc(100%+1px)] z-[100] w-full rounded-b-md border-[0.5px] border-solid bg-background shadow-md"
hidden={!open}
onMouseDown={(e) => {
e.preventDefault()
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
<div className="flex items-center px-3" cmdk-input-wrapper="">
<Search className="mr-2 size-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
ref={ref}
Expand Down

0 comments on commit 1676baf

Please sign in to comment.