Fix incompatility of the catalog-import plugin with the react-hook-form v6.15.4

Signed-off-by: Dominik Henneke <dominik.henneke@sda-se.com>
This commit is contained in:
Dominik Henneke
2021-03-02 14:22:43 +01:00
parent a2d9532698
commit 05183f2028
5 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
"git-url-parse": "^11.4.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-hook-form": "^6.6.0",
"react-hook-form": "^6.15.4",
"react-router": "6.0.0-beta.0",
"react-router-dom": "6.0.0-beta.0",
"react-use": "^15.3.3",
@@ -22,7 +22,7 @@ import {
Control,
Controller,
FieldErrors,
ValidationRules,
UseControllerOptions,
} from 'react-hook-form';
type Props<TFieldValue extends string> = {
@@ -32,7 +32,7 @@ type Props<TFieldValue extends string> = {
control?: Control<Record<string, any>>;
errors?: FieldErrors<Record<TFieldValue, string>>;
rules?: ValidationRules;
rules?: UseControllerOptions<Record<TFieldValue, any>>['rules'];
loading?: boolean;
loadingText?: string;
@@ -25,7 +25,7 @@ describe('<PreparePullRequestForm />', () => {
const onSubmitFn = jest.fn();
const { getByRole } = render(
<PreparePullRequestForm
<PreparePullRequestForm<{ main: string }>
defaultValues={{ main: 'default' }}
render={({ register }) => (
<>
@@ -49,7 +49,7 @@ describe('<PreparePullRequestForm />', () => {
const onSubmitFn = jest.fn();
const { getByRole, getByLabelText } = render(
<PreparePullRequestForm
<PreparePullRequestForm<{ main: string }>
defaultValues={{ main: 'default' }}
render={({ register }) => (
<>
@@ -80,7 +80,7 @@ describe('<PreparePullRequestForm />', () => {
const onSubmitFn = jest.fn();
const { queryByText, getByRole } = render(
<PreparePullRequestForm
<PreparePullRequestForm<{ main: string }>
defaultValues={{}}
render={({ errors, register }) => (
<>