Skip to content

Commit

Permalink
Merge pull request #394 from TykTechnologies/combobox2-formik-field-t…
Browse files Browse the repository at this point in the history
…ouched-on-change

calls setFieldTouched from the formik wrapper when the combobox2 value changes
  • Loading branch information
ifrim authored Nov 20, 2024
2 parents ba4573a + 8430d2a commit ce0bcae
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tyk-ui.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tyk-technologies/tyk-ui",
"version": "4.4.5",
"version": "4.4.6",
"description": "Tyk UI - ui reusable components",
"main": "src/index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/utils/formik/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const wrapper = (Component, options) => ({ field, form, ...properties }) => {
properties.onChange(newValue);
}
field.onChange({ target: { name: field.name, value: newValue, ...onChangeProps } });
if (form.validateOnBlur && Component.name === 'Combobox2') setTimeout(() => form.setFieldTouched(field.name));
});
setMyValue(newValue);
};
Expand Down

0 comments on commit ce0bcae

Please sign in to comment.