Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stutrek committed Oct 8, 2024
1 parent 840758b commit 940dfb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/src/app/demos/petrock/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ export const pages: SequenceChild<
isRequired: (data) => !!data.registration?.rockDetails?.isAccessorized,
isComplete: (data) =>
!data.registration?.rockDetails?.isAccessorized ||
(!!data.accessoryInventory &&
data.accessoryInventory.accessories.every(
(accessory) => !!accessory?.type,
)),
!!data.accessoryInventory?.accessories?.every(
(accessory) => !!accessory?.type,
),
Component: AccessoryInventoryForm,
},
{
Expand Down
2 changes: 2 additions & 0 deletions docs/src/components/FormContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
UseFormWatch,
Resolver,
UseFormReturn,
DeepPartial,
} from 'react-hook-form';
import { useForm } from 'react-hook-form';
import { useMultiPageHookForm } from '../../../src/hookForm';
Expand Down Expand Up @@ -90,6 +91,7 @@ export function FormContainer<DataT extends FieldValues>({
<div>
<h3 className="mt-0">Full Sequence</h3>
<SequenceVisualizer
// @ts-expect-error
data={watch()}
currentPage={currentPage}
pages={pages}
Expand Down

0 comments on commit 940dfb5

Please sign in to comment.