diff --git a/gradle/changelog/react_hook_form.yaml b/gradle/changelog/react_hook_form.yaml new file mode 100644 index 0000000000..a0165ffe22 --- /dev/null +++ b/gradle/changelog/react_hook_form.yaml @@ -0,0 +1,2 @@ +- type: added + description: Add support for react-hook-form ([#1656](https://github.com/scm-manager/scm-manager/pull/1656)) diff --git a/scm-ui/ui-components/package.json b/scm-ui/ui-components/package.json index 1b1546a772..a3eef7c72e 100644 --- a/scm-ui/ui-components/package.json +++ b/scm-ui/ui-components/package.json @@ -72,6 +72,7 @@ "react": "^17.0.1", "react-diff-view": "^2.4.1", "react-dom": "^17.0.1", + "react-hook-form": "^7.5.1", "react-i18next": "^10.13.1", "react-router-dom": "^5.1.2", "react-select": "^2.1.2", diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 4ff705e8e8..0d04539dc4 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -46421,8 +46421,6 @@ exports[`Storyshots Forms|AddKeyValueEntryToTableField Default 1`] = ` onBlur={[Function]} onChange={[Function]} onKeyPress={[Function]} - placeholder="" - type="text" value="" /> @@ -46444,8 +46442,6 @@ exports[`Storyshots Forms|AddKeyValueEntryToTableField Default 1`] = ` onBlur={[Function]} onChange={[Function]} onKeyPress={[Function]} - placeholder="" - type="text" value="" /> @@ -46497,8 +46493,6 @@ exports[`Storyshots Forms|AddKeyValueEntryToTableField Disabled 1`] = ` onBlur={[Function]} onChange={[Function]} onKeyPress={[Function]} - placeholder="" - type="text" value="" /> @@ -46521,8 +46515,6 @@ exports[`Storyshots Forms|AddKeyValueEntryToTableField Disabled 1`] = ` onBlur={[Function]} onChange={[Function]} onKeyPress={[Function]} - placeholder="" - type="text" value="" /> @@ -46558,21 +46550,18 @@ exports[`Storyshots Forms|Checkbox Default 1`] = ` >
@@ -46582,21 +46571,18 @@ exports[`Storyshots Forms|Checkbox Default 1`] = ` >
@@ -46606,21 +46592,18 @@ exports[`Storyshots Forms|Checkbox Default 1`] = ` >
@@ -46637,22 +46620,20 @@ exports[`Storyshots Forms|Checkbox Disabled 1`] = ` >
@@ -46660,6 +46641,132 @@ exports[`Storyshots Forms|Checkbox Disabled 1`] = ` `; +exports[`Storyshots Forms|Checkbox Legacy Events 1`] = ` +Array [ +
+
+ +
+
, +
+ false +
, +] +`; + +exports[`Storyshots Forms|Checkbox ReactHookForm 1`] = ` +
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+`; + +exports[`Storyshots Forms|Checkbox Ref 1`] = ` +Array [ +
+
+ +
+
, + , +] +`; + exports[`Storyshots Forms|Checkbox With HelpText 1`] = `