@plesk/ui-library 3.28.2 → 3.28.3

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.
@@ -78,7 +78,9 @@ class AutoClosable extends _react.Component {
78
78
  }
79
79
 
80
80
  componentDidMount() {
81
- document.body.addEventListener('click', this.onOutsideClick);
81
+ document.body.addEventListener('click', this.onOutsideClick, {
82
+ capture: true
83
+ });
82
84
 
83
85
  if (this.context) {
84
86
  this.context.addChild(this);
@@ -86,7 +88,9 @@ class AutoClosable extends _react.Component {
86
88
  }
87
89
 
88
90
  componentWillUnmount() {
89
- document.body.removeEventListener('click', this.onOutsideClick);
91
+ document.body.removeEventListener('click', this.onOutsideClick, {
92
+ capture: true
93
+ });
90
94
 
91
95
  if (this.context) {
92
96
  this.context.removeChild(this);
@@ -225,7 +225,7 @@ class FormField extends _react.Component {
225
225
  multi
226
226
  } = this.props;
227
227
 
228
- if (!description || multi && this.state.value.length - 1 > index) {
228
+ if (!description || multi && this.fieldApi.getValue().length - 1 > index) {
229
229
  return null;
230
230
  }
231
231
 
@@ -106,8 +106,6 @@ class Overlay extends _react.Component {
106
106
  isExist: true
107
107
  }, () => {
108
108
  this.prevFocusElement = document.activeElement;
109
- });
110
- setTimeout(() => {
111
109
  this.setState({
112
110
  isOpened: true
113
111
  }, () => {
@@ -195,8 +195,8 @@ const Select = ({
195
195
 
196
196
  if (filterValue) {
197
197
  const lowerFilterValue = filterValue.toLowerCase();
198
- groupFns.push(group => !!group.label && group.label.toLowerCase().indexOf(lowerFilterValue) === 0);
199
- optionFns.push(option => option.label.toLowerCase().indexOf(lowerFilterValue) === 0);
198
+ groupFns.push(group => !!group.label && group.label.toLowerCase().includes(lowerFilterValue));
199
+ optionFns.push(option => option.label.toLowerCase().includes(lowerFilterValue));
200
200
  }
201
201
 
202
202
  if (groupFns.length || optionFns.length) {
@@ -276,7 +276,7 @@ const Select = ({
276
276
 
277
277
  const handleHighlightSearch = query => {
278
278
  const lowerQuery = query.toLowerCase();
279
- const index = options.findIndex(o => !o.disabled && o.label.toLowerCase().indexOf(lowerQuery) === 0);
279
+ const index = options.findIndex(o => !o.disabled && o.label.toLowerCase().includes(lowerQuery));
280
280
 
281
281
  if (index !== -1) {
282
282
  setHighlightedIndex(index);
package/cjs/index.js CHANGED
@@ -54,6 +54,6 @@ Object.keys(_components).forEach(function (key) {
54
54
  });
55
55
  });
56
56
  // Copyright 1999-2018. Plesk International GmbH. All rights reserved.
57
- const version = "3.28.2";
57
+ const version = "3.28.3";
58
58
  exports.version = version;
59
59
  (0, _svg4everybody.default)();