@orfium/ictinus 4.77.0 → 4.77.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.
@@ -16,7 +16,7 @@ export declare type SelectOption = {
16
16
  } & SelectOptionValues;
17
17
  export declare type Props = {
18
18
  /** The function that is used to return the selected options */
19
- handleSelectedOption?: (selectedOption: SelectOption) => void;
19
+ handleSelectedOption?: (selectedOption?: SelectOption) => void;
20
20
  /** the default value of the select if needed */
21
21
  /** TODO: defaultValue is duplication of selectedOption*/
22
22
  defaultValue?: SelectOption;
@@ -59,7 +59,7 @@ export declare type Props = {
59
59
  } & TextFieldProps;
60
60
  declare const Select: React.ForwardRefExoticComponent<{
61
61
  /** The function that is used to return the selected options */
62
- handleSelectedOption?: ((selectedOption: SelectOption) => void) | undefined;
62
+ handleSelectedOption?: ((selectedOption?: SelectOption | undefined) => void) | undefined;
63
63
  /** the default value of the select if needed */
64
64
  /** TODO: defaultValue is duplication of selectedOption*/
65
65
  defaultValue?: SelectOption | undefined;
@@ -226,6 +226,7 @@ var Select = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
226
226
  var isBackspace = event.key === 'Backspace';
227
227
  if (isBackspace) {
228
228
  setInputValue(emptyValue);
229
+ handleSelectedOption(undefined);
229
230
  debouncedOnChange('');
230
231
  }
231
232
  };
@@ -63,6 +63,9 @@ var useMultiselectUtils = function useMultiselectUtils(_ref) {
63
63
  if (!lastItem.isCreated) {
64
64
  setAvailableMultiSelectOptions([].concat(availableMultiSelectOptions, [lastItem]));
65
65
  }
66
+ if (onOptionDelete) {
67
+ onOptionDelete(lastItem);
68
+ }
66
69
  }
67
70
  }
68
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orfium/ictinus",
3
- "version": "4.77.0",
3
+ "version": "4.77.1",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",