@pushwoosh/dumb-components 1.1.153 → 1.1.154

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.
@@ -55,6 +55,11 @@ export function AutosizeInput(props) {
55
55
  const formattedValue = maxLength ? event.currentTarget.value.slice(0, maxLength) : event.currentTarget.value;
56
56
  onChange === null || onChange === void 0 || onChange(formattedValue.replace(/\n/g, ''));
57
57
  };
58
+ const onFocus = () => {
59
+ if (value === DEFAULT_EMPTY_VALUE) {
60
+ onChange === null || onChange === void 0 || onChange('');
61
+ }
62
+ };
58
63
  const onBlur = () => {
59
64
  if (value === '') {
60
65
  onChange === null || onChange === void 0 || onChange(defaultValue.current);
@@ -73,6 +78,7 @@ export function AutosizeInput(props) {
73
78
  placeholder: placeholder,
74
79
  onKeyDown: onKeyDown,
75
80
  onChange: onChangeHandler,
81
+ onFocus: onFocus,
76
82
  onBlur: onBlur
77
83
  }), _jsx("span", {
78
84
  ref: hiddenValueRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.153",
3
+ "version": "1.1.154",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",