intelicoreact 1.0.95 → 1.0.96

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.
@@ -32,6 +32,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
32
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
33
 
34
34
  var RC = 'dropdown-live-search';
35
+ var notReact = {
36
+ searchValue: ''
37
+ };
35
38
 
36
39
  var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
37
40
  var value = _ref.value,
@@ -75,7 +78,12 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
75
78
  var _useState5 = (0, _react.useState)(labelByValue),
76
79
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
77
80
  searchValue = _useState6[0],
78
- setSearchValue = _useState6[1];
81
+ setSV = _useState6[1];
82
+
83
+ var setSearchValue = function setSearchValue(val) {
84
+ setSV(val);
85
+ notReact.searchValue = val;
86
+ };
79
87
 
80
88
  var dropdownLiveSearchRef = (0, _react.useRef)(null);
81
89
  var dropdownListBoxRef = (0, _react.useRef)(null);
@@ -228,7 +236,7 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
228
236
  var doScrollCallback = (0, _react.useCallback)(function (e) {
229
237
  if (doRequest && typeof doRequest === 'function') {
230
238
  if (Math.round(e.target.clientHeight + e.target.scrollTop) == e.target.scrollHeight) {
231
- doRequest(searchValue);
239
+ doRequest(notReact.searchValue, true);
232
240
  }
233
241
  }
234
242
  }, [options]);
@@ -261,7 +269,7 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
261
269
  }, isSearchable ? /*#__PURE__*/_react.default.createElement("input", {
262
270
  ref: searchInputRef,
263
271
  className: "".concat(RC, "__input"),
264
- value: searchValue,
272
+ value: searchValue || labelByValue,
265
273
  onChange: handle.onInputChange,
266
274
  placeholder: placeholder,
267
275
  onFocus: searchableInputFocus,
@@ -58,7 +58,6 @@
58
58
  box-sizing: border-box;
59
59
  min-width: 100%;
60
60
  max-height: 320px;
61
- margin-top: 4px;
62
61
  padding: 5px 0;
63
62
  border: 1px solid #E2E5EC;
64
63
  background: #FFF;
@@ -121,6 +120,7 @@
121
120
  }
122
121
 
123
122
  &--no-options {
123
+ padding-left: 8px;
124
124
  box-sizing: border-box;
125
125
  }
126
126
 
@@ -190,7 +190,8 @@
190
190
  z-index: 99999;
191
191
  display: block;
192
192
  box-sizing: border-box;
193
- top: 26px;
193
+ top: 30px;
194
+ background-color: #ffffff;
194
195
  }
195
196
 
196
197
  &.disabled {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.0.95",
3
+ "version": "1.0.96",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [