Skip to content

Commit 6d6efa8

Browse files
committed
type fixes
1 parent 840758b commit 6d6efa8

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

docs/src/app/demos/petrock/sequence.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,9 @@ export const pages: SequenceChild<
7979
isRequired: (data) => !!data.registration?.rockDetails?.isAccessorized,
8080
isComplete: (data) =>
8181
!data.registration?.rockDetails?.isAccessorized ||
82-
(!!data.accessoryInventory &&
83-
data.accessoryInventory.accessories.every(
84-
(accessory) => !!accessory?.type,
85-
)),
82+
!!data.accessoryInventory?.accessories?.every(
83+
(accessory) => !!accessory?.type,
84+
),
8685
Component: AccessoryInventoryForm,
8786
},
8887
{

docs/src/components/FormContainer.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type {
1010
UseFormWatch,
1111
Resolver,
1212
UseFormReturn,
13+
DeepPartial,
1314
} from 'react-hook-form';
1415
import { useForm } from 'react-hook-form';
1516
import { useMultiPageHookForm } from '../../../src/hookForm';
@@ -90,6 +91,7 @@ export function FormContainer<DataT extends FieldValues>({
9091
<div>
9192
<h3 className="mt-0">Full Sequence</h3>
9293
<SequenceVisualizer
94+
// @ts-expect-error
9395
data={watch()}
9496
currentPage={currentPage}
9597
pages={pages}

package.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"version": "0.1.1",
44
"description": "Tools to handle multi-page forms",
55
"main": "dist/index.js",
6-
"files": [
7-
"dist"
8-
],
6+
"files": ["dist"],
97
"scripts": {
108
"build": "tsc",
119
"build:watch": "tsc -w",
@@ -16,10 +14,7 @@
1614
"test": "jest",
1715
"test:watch": "jest --watch"
1816
},
19-
"keywords": [
20-
"forms",
21-
"multi-page"
22-
],
17+
"keywords": ["forms", "multi-page"],
2318
"author": "Stu Kabakoff",
2419
"license": "MIT",
2520
"devDependencies": {

0 commit comments

Comments
 (0)