@megafon/ui-core 8.0.4 → 8.0.5
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.
|
@@ -324,8 +324,14 @@ var Search = function Search(_ref) {
|
|
|
324
324
|
labelRef.current.style.top = "".concat(DEFAULT_LABEL_TOP_POSITION - scrollTop, "px");
|
|
325
325
|
};
|
|
326
326
|
React.useEffect(function () {
|
|
327
|
+
return setSearchQuery(value);
|
|
328
|
+
}, [value]);
|
|
329
|
+
React.useEffect(function () {
|
|
330
|
+
if (value !== searchQuery) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
327
333
|
textareaResize();
|
|
328
|
-
}, [textareaResize]);
|
|
334
|
+
}, [searchQuery, value, textareaResize]);
|
|
329
335
|
React.useEffect(function () {
|
|
330
336
|
if (!resizerRef.current || !isTextarea || !showResizer) {
|
|
331
337
|
return;
|
|
@@ -362,9 +368,6 @@ var Search = function Search(_ref) {
|
|
|
362
368
|
resizerRef.current.addEventListener('mousedown', handleStartResize);
|
|
363
369
|
resizerRef.current.addEventListener('touchstart', handleStartResize);
|
|
364
370
|
}, [isTextarea, minTextareaHeight, showResizer]);
|
|
365
|
-
React.useEffect(function () {
|
|
366
|
-
return setSearchQuery(value);
|
|
367
|
-
}, [value]);
|
|
368
371
|
React.useEffect(function () {
|
|
369
372
|
debouncedOnChange.current = debounce(function (inputValue) {
|
|
370
373
|
return onChange && onChange(inputValue);
|
|
@@ -333,8 +333,14 @@ var Search = function Search(_ref) {
|
|
|
333
333
|
labelRef.current.style.top = "".concat(DEFAULT_LABEL_TOP_POSITION - scrollTop, "px");
|
|
334
334
|
};
|
|
335
335
|
React.useEffect(function () {
|
|
336
|
+
return setSearchQuery(value);
|
|
337
|
+
}, [value]);
|
|
338
|
+
React.useEffect(function () {
|
|
339
|
+
if (value !== searchQuery) {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
336
342
|
textareaResize();
|
|
337
|
-
}, [textareaResize]);
|
|
343
|
+
}, [searchQuery, value, textareaResize]);
|
|
338
344
|
React.useEffect(function () {
|
|
339
345
|
if (!resizerRef.current || !isTextarea || !showResizer) {
|
|
340
346
|
return;
|
|
@@ -371,9 +377,6 @@ var Search = function Search(_ref) {
|
|
|
371
377
|
resizerRef.current.addEventListener('mousedown', handleStartResize);
|
|
372
378
|
resizerRef.current.addEventListener('touchstart', handleStartResize);
|
|
373
379
|
}, [isTextarea, minTextareaHeight, showResizer]);
|
|
374
|
-
React.useEffect(function () {
|
|
375
|
-
return setSearchQuery(value);
|
|
376
|
-
}, [value]);
|
|
377
380
|
React.useEffect(function () {
|
|
378
381
|
debouncedOnChange.current = (0, _lodash["default"])(function (inputValue) {
|
|
379
382
|
return onChange && onChange(inputValue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-core",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"styles"
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"simplebar-react": "^3.2.5",
|
|
105
105
|
"swiper": "^11.1.1"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "da89fd366d75df783e07e4fe1d65f4af83a4cf67"
|
|
108
108
|
}
|