diff --git a/app/client/modules/backups/components/create-schedule-form.tsx b/app/client/modules/backups/components/create-schedule-form.tsx index 1d94ff17..38437f7f 100644 --- a/app/client/modules/backups/components/create-schedule-form.tsx +++ b/app/client/modules/backups/components/create-schedule-form.tsx @@ -2,6 +2,7 @@ import { arktypeResolver } from "@hookform/resolvers/arktype"; import { useQuery } from "@tanstack/react-query"; import { type } from "arktype"; +import { X } from "lucide-react"; import { useCallback, useState } from "react"; import { useForm } from "react-hook-form"; import { listRepositoriesOptions } from "~/client/api-client/@tanstack/react-query.gen"; @@ -169,6 +170,16 @@ export const CreateScheduleForm = ({ initialValues, formId, onSubmit, volume }: [form], ); + const handleRemovePath = useCallback( + (pathToRemove: string) => { + const newPaths = new Set(selectedPaths); + newPaths.delete(pathToRemove); + setSelectedPaths(newPaths); + form.setValue("includePatterns", Array.from(newPaths)); + }, + [selectedPaths, form], + ); + return (
Selected paths:

{Array.from(selectedPaths).map((path) => ( - + {path} + ))}