Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/gamut/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"react-aria-components": "1.8.0",
"react-aria-tabpanel": "^4.4.0",
"react-focus-on": "^3.10.0",
"react-hook-form": "^7.53.1",
"react-hook-form": "^7.65.0",
"react-player": "^2.16.0",
"react-select": "^5.2.2",
"react-truncate-markup": "^5.1.2",
Expand Down
1 change: 1 addition & 0 deletions packages/gamut/src/ConnectedForm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ export {
useGetInitialFormValue,
useSubmitState,
} from './utils';
export type { Validate, UseFormReturn, SubmitHandler } from 'react-hook-form';
5 changes: 2 additions & 3 deletions packages/gamut/src/Form/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { UnpackNestedValue } from 'react-hook-form';

export type FormValues<T> = {
[key in keyof T]?: UnpackNestedValue<T[key]>;
[key in keyof T]?: T[key];
};

export { CheckboxPaddingProps } from './inputs/Checkbox';

export interface BaseInputProps {
Expand Down
3 changes: 1 addition & 2 deletions packages/gamut/src/GridForm/GridForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
DefaultValues,
Mode,
SubmitHandler,
UnpackNestedValue,
} from 'react-hook-form';

import { ButtonProps } from '../Button';
Expand Down Expand Up @@ -111,7 +110,7 @@ export function GridForm<Values extends FormValues<Values>>({
isGridFormSection(field) ? field.fields : field
);

type Defaults = UnpackNestedValue<DeepPartial<Values>>;
type Defaults = DeepPartial<Values>;

const defaultValues = flatFields.reduce<Defaults>(
// since our checkbox is a controlled input, it needs to be provided with a default value in order to reset correctly.
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15806,10 +15806,10 @@ react-helmet-async@^2.0.5:
react-fast-compare "^3.2.2"
shallowequal "^1.1.0"

react-hook-form@^7.53.1:
version "7.53.1"
resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.1.tgz#3f2cd1ed2b3af99416a4ac674da2d526625add67"
integrity sha512-6aiQeBda4zjcuaugWvim9WsGqisoUk+etmFEsSUMm451/Ic8L/UAb7sRtMj3V+Hdzm6mMjU1VhiSzYUZeBm0Vg==
react-hook-form@^7.65.0:
version "7.66.0"
resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.66.0.tgz#1a09ea9d0ebb3bdda5073b08a486538d37d9c0d4"
integrity sha512-xXBqsWGKrY46ZqaHDo+ZUYiMUgi8suYu5kdrS20EG8KiL7VRQitEbNjm+UcrDYrNi1YLyfpmAeGjCZYXLT9YBw==

[email protected]:
version "18.1.0"
Expand Down
Loading