Start supporting edit forms for any document type.
This commit is contained in:
@@ -3,7 +3,7 @@ import { pb } from "@/lib/pocketbase";
|
||||
import type { Document, RelationshipType } from "@/lib/types";
|
||||
import { useState } from "react";
|
||||
import { Loader } from "./Loader";
|
||||
import { DocumentForm } from "./documents/DocumentForm";
|
||||
import { NewRelatedDocumentForm } from "./documents/NewRelatedDocumentForm";
|
||||
import { DocumentRow } from "./documents/DocumentRow";
|
||||
|
||||
interface RelationshipListProps {
|
||||
@@ -68,7 +68,7 @@ export function RelationshipList({
|
||||
error={error}
|
||||
renderRow={(document) => <DocumentRow document={document} />}
|
||||
newItemForm={(onSubmit) => (
|
||||
<DocumentForm
|
||||
<NewRelatedDocumentForm
|
||||
campaignId={root.campaign}
|
||||
relationshipType={relationshipType}
|
||||
onCreate={async (doc: Document) => {
|
||||
|
||||
Reference in New Issue
Block a user