@homebound/beam 2.91.0 → 2.91.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.
@@ -12,7 +12,7 @@ export interface ChipSelectFieldProps<O, V extends Value> {
12
12
  onBlur?: () => void;
13
13
  onFocus?: () => void;
14
14
  clearable?: boolean;
15
- onCreateNew?: (value: string) => Promise<O>;
15
+ onCreateNew?: (value: string) => Promise<void>;
16
16
  disabled?: boolean | ReactNode;
17
17
  }
18
18
  export declare function ChipSelectField<O, V extends Value>(props: ChipSelectFieldProps<O, V>): JSX.Element;
@@ -138,8 +138,7 @@ function ChipSelectField(props) {
138
138
  (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
139
139
  }, [setShowInput, setInputValue]);
140
140
  const field = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showInput && onCreateNew && ((0, jsx_runtime_1.jsx)(ChipTextField_1.ChipTextField, Object.assign({ autoFocus: true, label: "Add new", value: inputValue, onChange: setInputValue, onEnter: async () => {
141
- const newOption = await onCreateNew(inputValue);
142
- listData.insertBefore(createNewOpt.id, newOption);
141
+ await onCreateNew(inputValue);
143
142
  removeCreateNewField();
144
143
  }, onBlur: removeCreateNewField }, tid.createNewField), void 0)), (0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: wrapperRef, css: {
145
144
  ...chipStyles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.91.0",
3
+ "version": "2.91.1",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",