Skip to content

Commit

Permalink
Enhance LocationSearch: Use "instance" for search & Adjust Input Padd…
Browse files Browse the repository at this point in the history
…ing (#10554)
  • Loading branch information
DonXavierdev authored Feb 13, 2025
1 parent 16af629 commit 52efe89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/components/Location/LocationSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import locationApi from "@/types/location/locationApi";

interface LocationSearchProps {
facilityId: string;
mode?: "kind" | "location";
mode?: "kind" | "instance";
onSelect: (location: LocationList) => void;
disabled?: boolean;
value?: LocationList | null;
Expand All @@ -44,7 +44,6 @@ export function LocationSearch({
}),
enabled: facilityId !== "preview",
});

return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild disabled={disabled}>
Expand All @@ -57,7 +56,7 @@ export function LocationSearch({
</div>
</PopoverTrigger>
<PopoverContent className="w-[400px] p-0">
<Command>
<Command className="pt-1">
<CommandInput
placeholder="Search locations..."
value={search}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function LocationQuestion({
Select Location
</label>
<LocationSearch
mode="kind"
mode="instance"
facilityId={facilityId}
onSelect={handleLocationSelect}
disabled={disabled}
Expand Down

0 comments on commit 52efe89

Please sign in to comment.