intelicoreact 1.1.84 → 1.1.85

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.
@@ -23,8 +23,6 @@ var _useDebounce = require("../../../Functions/useDebounce");
23
23
 
24
24
  var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
25
25
 
26
- var _utils = require("../../../Functions/utils");
27
-
28
26
  var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
29
27
 
30
28
  require("./DropdownLiveSearch.scss");
@@ -79,11 +77,6 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
79
77
  searchValue = _useState6[0],
80
78
  setSV = _useState6[1];
81
79
 
82
- var _useState7 = (0, _react.useState)(options),
83
- _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
84
- previousOptions = _useState8[0],
85
- setPreviousOptions = _useState8[1];
86
-
87
80
  var dropdownLiveSearchRef = (0, _react.useRef)(null);
88
81
  var dropdownListBoxRef = (0, _react.useRef)(null);
89
82
  var dropdownListRef = (0, _react.useRef)(null);
@@ -95,10 +88,10 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
95
88
  searchValueRef.current = val;
96
89
  };
97
90
 
98
- var _useState9 = (0, _react.useState)(false),
99
- _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
100
- isFocusedByClick = _useState10[0],
101
- setIsFocusedByClick = _useState10[1];
91
+ var _useState7 = (0, _react.useState)(false),
92
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
93
+ isFocusedByClick = _useState8[0],
94
+ setIsFocusedByClick = _useState8[1];
102
95
 
103
96
  var debouncedSearchTerm = (0, _useDebounce.useDebounce)({
104
97
  searchValue: searchValue,
@@ -250,7 +243,7 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
250
243
  }, [dropdownLiveSearchRef, isOpen]);
251
244
  var doScrollCallback = (0, _react.useCallback)(function (e) {
252
245
  if (doRequest && typeof doRequest === 'function') {
253
- if (Math.round(e.target.clientHeight + e.target.scrollTop) == e.target.scrollHeight && (0, _utils.compare)(options, previousOptions)) {
246
+ if (Math.round(e.target.clientHeight + e.target.scrollTop) == e.target.scrollHeight) {
254
247
  doRequest(searchValueRef.current, true);
255
248
  }
256
249
  }
@@ -266,9 +259,6 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
266
259
  removeEventListener('scroll', doScrollCallback);
267
260
  };
268
261
  }, [isOpen, dropdownListRef]);
269
- (0, _react.useEffect)(function () {
270
- setPreviousOptions(options);
271
- }, [options]);
272
262
  return /*#__PURE__*/_react.default.createElement("div", {
273
263
  className: (0, _classnames.default)(RC, className, disabled),
274
264
  ref: dropdownLiveSearchRef
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.1.84",
3
+ "version": "1.1.85",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [