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

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.
@@ -80,7 +80,7 @@ var MultipleSelect = function MultipleSelect(props) {
80
80
  var selectWrapper = (0, _react.useRef)();
81
81
  var gridElRef = (0, _react.useRef)();
82
82
  var descriptionKeyIsString = typeof descriptionKey === 'string';
83
- var insideComponents = ['item', 'menubutton', 'filterinput', 'filtercontainer', 'label', 'select-dropdown'];
83
+ var insideComponents = ['item', 'menubutton', 'filterinput', 'filtercontainer', 'label', 'actionbutton'];
84
84
  var onScreenResize = function onScreenResize() {
85
85
  if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
86
86
  };
@@ -129,6 +129,7 @@ var MultipleSelect = function MultipleSelect(props) {
129
129
  setDropdownWidth(dropdownWidthFocus);
130
130
  };
131
131
  var onSelect = function onSelect(select) {
132
+ var _dropdownRef$current;
132
133
  if (select === null) return;
133
134
  var currentsSelect = [].concat(_toConsumableArray(currents), [select]);
134
135
  setCurrents(currentsSelect);
@@ -137,10 +138,11 @@ var MultipleSelect = function MultipleSelect(props) {
137
138
  if (props.onSelect) setSelected(props.onSelect(currentsSelect.map(function (i) {
138
139
  return i[idKey];
139
140
  })));
140
- _onFocus();
141
+ (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.focus();
141
142
  };
142
143
  var onUnselect = function onUnselect(id) {
143
144
  if (currents) {
145
+ var _dropdownRef$current2;
144
146
  var result = currents.filter(function (item) {
145
147
  return item[idKey] !== id;
146
148
  });
@@ -148,6 +150,7 @@ var MultipleSelect = function MultipleSelect(props) {
148
150
  if (props.onSelect) setSelected(props.onSelect(result.map(function (i) {
149
151
  return i[idKey];
150
152
  })));
153
+ (_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : _dropdownRef$current2.focus();
151
154
  }
152
155
  };
153
156
  var onOpenClose = function onOpenClose() {
@@ -186,6 +189,8 @@ var MultipleSelect = function MultipleSelect(props) {
186
189
  return i[idKey];
187
190
  }));
188
191
  }
192
+ } else if (e.keyCode === constants.keyCodes.TAB) {
193
+ setOpened(false);
189
194
  }
190
195
  }
191
196
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.0.12-beta.7",
3
+ "version": "1.0.12-beta.8",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",