linear-react-components-ui 1.0.10-rc.8 → 1.0.10-rc.9

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.
@@ -89,10 +89,6 @@ var SimpleSelect = function SimpleSelect(props) {
89
89
  _useState16 = _slicedToArray(_useState15, 2),
90
90
  isTyping = _useState16[0],
91
91
  setIsTyping = _useState16[1];
92
- var _useState17 = (0, _react.useState)(null),
93
- _useState18 = _slicedToArray(_useState17, 2),
94
- valueFromProps = _useState18[0],
95
- setValueFromProps = _useState18[1];
96
92
  var dropdownRef = (0, _react.useRef)(null);
97
93
  var componentId = "select-component".concat(_uuid.default.v1());
98
94
  var componentRef = (0, _react.useRef)(null);
@@ -241,14 +237,13 @@ var SimpleSelect = function SimpleSelect(props) {
241
237
  }
242
238
  }, [gridLayout]);
243
239
  (0, _react.useEffect)(function () {
244
- if (value !== valueFromProps && dataSourceWithAllOptions.length > 0) {
240
+ if (dataSourceWithAllOptions.length > 0) {
245
241
  var newCurrent = null;
246
- if (value) {
242
+ if (value || value === 0) {
247
243
  newCurrent = dataSourceWithAllOptions.find(function (i) {
248
244
  var _i$idKey;
249
- return value && ((_i$idKey = i[idKey]) === null || _i$idKey === void 0 ? void 0 : _i$idKey.toString().toLowerCase()) === (value === null || value === void 0 ? void 0 : value.toString().toLowerCase());
245
+ return (value || value === 0) && ((_i$idKey = i[idKey]) === null || _i$idKey === void 0 ? void 0 : _i$idKey.toString().toLowerCase()) === (value === null || value === void 0 ? void 0 : value.toString().toLowerCase());
250
246
  });
251
- setValueFromProps(value);
252
247
  } else if (dataSourceWithAllOptions.length > 0 && selectFirstOnEnter) {
253
248
  newCurrent = dataSourceWithAllOptions[0];
254
249
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.0.10-rc.8",
3
+ "version": "1.0.10-rc.9",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",