Skip to content

Commit

Permalink
Fix scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Oct 15, 2024
1 parent eff4e66 commit a1abaed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions web/src/components/overlay/dialog/PlatformAwareDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ export function PlatformAwareSheet({
>
<MobilePageTitle>More Filters</MobilePageTitle>
</MobilePageHeader>
<div className="scrollbar-container h-full overflow-auto px-4 pb-20">
{content}
</div>
<div className={contentClassName}>{content}</div>
</MobilePageContent>
</MobilePage>
</div>
Expand Down
8 changes: 6 additions & 2 deletions web/src/components/overlay/dialog/SearchFilterDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
import { isDesktop } from "react-device-detect";
import { isDesktop, isMobile, isMobileOnly } from "react-device-detect";

Check failure on line 19 in web/src/components/overlay/dialog/SearchFilterDialog.tsx

View workflow job for this annotation

GitHub Actions / Web - Lint

'isMobile' is defined but never used. Allowed unused vars must match /^_/u
import { useFormattedHour } from "@/hooks/use-date-utils";
import Heading from "@/components/ui/heading";
import FilterSwitch from "@/components/filter/FilterSwitch";
import { Switch } from "@/components/ui/switch";
import { Label } from "@/components/ui/label";
import { DropdownMenuSeparator } from "@/components/ui/dropdown-menu";
import { cn } from "@/lib/utils";

type SearchFilterDialogProps = {
config?: FrigateConfig;
Expand Down Expand Up @@ -116,7 +117,10 @@ export default function SearchFilterDialog({
<PlatformAwareSheet
trigger={trigger}
content={content}
contentClassName="w-auto lg:w-[300px]"
contentClassName={cn(
"w-auto lg:w-[300px] scrollbar-container h-full overflow-auto px-4",
isMobileOnly && "pb-20",
)}
open={open}
onOpenChange={(open) => {
if (!open) {
Expand Down

0 comments on commit a1abaed

Please sign in to comment.