Skip to content

Commit

Permalink
chore: Bump form-state.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh committed Dec 15, 2023
1 parent 9106443 commit de341b7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"format": "prettier --loglevel warn --write \"**/*.{ts,tsx,css,md,mdx}\""
},
"dependencies": {
"@homebound/form-state": "^2.20.1",
"@homebound/form-state": "^2.25.0",
"@internationalized/number": "^3.0.3",
"@popperjs/core": "^2.11.6",
"@react-aria/utils": "^3.18.0",
Expand Down
4 changes: 3 additions & 1 deletion src/forms/BoundSelectAndTextField.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import { Observer } from "mobx-react";
import { BoundSelectAndTextField } from "src";
import { ScheduleTypes } from "src/components/Filters/testDomain";
import { Css } from "src/Css";
import { useState } from "react";

export default {
component: BoundSelectAndTextField,
} as Meta;

export function Example() {
const formState = useFormState({ config, init: { type: ScheduleTypes.Task } });
const [input] = useState({ type: ScheduleTypes.Task });
const formState = useFormState({ config, init: { input } });
const types = [
{ id: ScheduleTypes.Task, name: "Task" },
{ id: ScheduleTypes.Milestone, name: "Milestone" },
Expand Down
3 changes: 2 additions & 1 deletion src/forms/SuperDrawerApp.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ export function SuperDrawerApp() {
}

const initFormValue: AuthorInput = {};

function SuperDrawerForm() {
const { closeDrawer, addCanCloseDrawerCheck } = useSuperDrawer();
const formState = useFormState({ config: formConfig, init: initFormValue });
const formState = useFormState({ config: formConfig, init: { input: initFormValue } });

// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => addCanCloseDrawerCheck(() => !formState.dirty), []);
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2625,7 +2625,7 @@ __metadata:
"@emotion/jest": ^11.10.5
"@emotion/react": ^11.10.6
"@homebound/eslint-config": ^1.8.0
"@homebound/form-state": ^2.20.1
"@homebound/form-state": ^2.25.0
"@homebound/rtl-react-router-utils": 1.0.3
"@homebound/rtl-utils": ^2.65.0
"@homebound/truss": ^1.132.0
Expand Down Expand Up @@ -2753,16 +2753,16 @@ __metadata:
languageName: node
linkType: hard

"@homebound/form-state@npm:^2.20.1":
version: 2.20.1
resolution: "@homebound/form-state@npm:2.20.1"
"@homebound/form-state@npm:^2.25.0":
version: 2.25.0
resolution: "@homebound/form-state@npm:2.25.0"
dependencies:
fast-deep-equal: ^3.1.3
is-plain-object: ^5.0.0
peerDependencies:
mobx: ">=6"
react: ">=16"
checksum: a2509821a2d5f1f9887a3410b22d7f6c4952547132ca60f251c0a26de7ef6792eadca57c271a90dee1517b550c1e7ec0a6a439259de7e7a136a520c97bd38b71
checksum: a78be0637c3e50276b83beb907925b171b23be7732dbd56c7a019e7bd196eca85d806ed330264bf230a9eb6ab3366ea4918bc0a708bf0f776efa757d0b889f95
languageName: node
linkType: hard

Expand Down

0 comments on commit de341b7

Please sign in to comment.