linear-react-components-ui 1.0.12-beta.6 → 1.0.12-beta.7

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.
@@ -164,20 +164,20 @@ var MultipleSelect = function MultipleSelect(props) {
164
164
  if (!currents.includes(selected)) onSelect(selected);
165
165
  } else if ([constants.keyCodes.ARROW_UP, constants.keyCodes.ARROW_DOWN].includes(e.keyCode)) {
166
166
  if (!opened) setOpened(true);
167
- var index = dataSource ? dataSource.findIndex(function (d) {
167
+ var index = dataCombo ? dataCombo.findIndex(function (d) {
168
168
  return d === selected;
169
169
  }) : 0;
170
170
  if (e.keyCode === constants.keyCodes.ARROW_DOWN) {
171
- index = dataSource && index === dataSource.length - 1 ? 0 : index + 1;
171
+ index = dataCombo && index === dataCombo.length - 1 ? 0 : index + 1;
172
172
  } else {
173
- index = dataSource && index === 0 ? dataSource.length - 1 : index - 1;
173
+ index = dataCombo && index === 0 ? dataCombo.length - 1 : index - 1;
174
174
  }
175
- if (dataSource && dataSource.length) {
176
- if (descriptionKeyIsString && dataSource[index][descriptionKey]) {
177
- setInputValue(dataSource[index][descriptionKey]);
178
- } else if (!descriptionKeyIsString) setInputValue([descriptionKey(dataSource[index])]);
175
+ if (dataCombo && dataCombo.length) {
176
+ if (descriptionKeyIsString && dataCombo[index][descriptionKey]) {
177
+ setInputValue(dataCombo[index][descriptionKey]);
178
+ } else if (!descriptionKeyIsString) setInputValue([descriptionKey(dataCombo[index])]);
179
179
  }
180
- if (dataSource) setSelected(dataSource[index]);
180
+ if (dataCombo) setSelected(dataCombo[index]);
181
181
  } else if (e.keyCode === constants.keyCodes.BACKSPACE) {
182
182
  if (inputValue.length === 0) {
183
183
  var currentsKeyDown = _lodash.default.dropRight(currents);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.0.12-beta.6",
3
+ "version": "1.0.12-beta.7",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",