@nolwenture/formik-jsonschema-form 0.21.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,7 @@ export const SearchableSelectField = (props) => {
32
32
  }, [isActive]);
33
33
  return (_jsx(SearchListOption, Object.assign({ ref: ref }, rest, { children: children })));
34
34
  };
35
- const { name, uiSchema, onChange } = props;
35
+ const { name, uiSchema, onChange, onSelect } = props;
36
36
  const { props: inputProps, placeholder, clearButtonText, expandText, notFoundMessage, hoverColors = {}, hideClearButton = false, showOptionsMenu = false, // makes CSS styling easier
37
37
  } = useExtractUiSchema(uiSchema);
38
38
  const [{ value }, __, { setValue }] = useField(name);
@@ -101,6 +101,7 @@ export const SearchableSelectField = (props) => {
101
101
  setSearchTerm((_a = item.title) !== null && _a !== void 0 ? _a : "");
102
102
  setValue(item.const);
103
103
  setShowOptions(false);
104
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect(item.const);
104
105
  };
105
106
  const handleFocus = () => {
106
107
  setShowOptions(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nolwenture/formik-jsonschema-form",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "Formik form generation from json schema",
5
5
  "author": "Antti Vikman <antti.vikman@nolwenture.com>",
6
6
  "contributors": [