indicator-ui 0.0.334 → 0.0.336
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.
package/dist/index.js
CHANGED
|
@@ -41554,17 +41554,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41554
41554
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
41555
41555
|
|
|
41556
41556
|
|
|
41557
|
-
function useDebouncedInvoker() {
|
|
41558
|
-
var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {
|
|
41559
|
-
return undefined;
|
|
41560
|
-
};
|
|
41557
|
+
function useDebouncedInvoker(callback) {
|
|
41561
41558
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
41562
41559
|
var callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(callback);
|
|
41563
41560
|
callbackRef.current = callback;
|
|
41564
41561
|
var debouncedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
|
41565
41562
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
41566
41563
|
debouncedRef.current = lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
|
41567
|
-
callbackRef.current();
|
|
41564
|
+
return callbackRef.current.apply(callbackRef, arguments);
|
|
41568
41565
|
}, delay);
|
|
41569
41566
|
return function () {
|
|
41570
41567
|
var _debouncedRef$current;
|
|
@@ -41574,7 +41571,10 @@ function useDebouncedInvoker() {
|
|
|
41574
41571
|
// Возвращаем вызываемую функцию
|
|
41575
41572
|
return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
|
41576
41573
|
var _debouncedRef$current2;
|
|
41577
|
-
(
|
|
41574
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41575
|
+
args[_key] = arguments[_key];
|
|
41576
|
+
}
|
|
41577
|
+
return (_debouncedRef$current2 = debouncedRef.current) === null || _debouncedRef$current2 === void 0 ? void 0 : _debouncedRef$current2.call.apply(_debouncedRef$current2, [debouncedRef].concat(args));
|
|
41578
41578
|
}, []);
|
|
41579
41579
|
}
|
|
41580
41580
|
|