react-ui-basics 0.0.233 → 0.0.235

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-ui-basics",
3
- "version": "0.0.233",
3
+ "version": "0.0.235",
4
4
  "description": "",
5
5
  "module": "index.js",
6
6
  "_main": "index.cjs.js",
package/router/NavLink.js CHANGED
@@ -9,7 +9,7 @@ const NavLink = (props) => {
9
9
  const other = __extends({}, props);
10
10
  delete other.activeClassName;
11
11
  delete other.highlightPath;
12
- return jsxRuntime_2(Route, { path: highlightPath || href, controller: matches => jsxRuntime_2(Link, __extends({}, props, { [ReactConstants[5]]: classNames(className, matches && activeClassName) })) });
12
+ return jsxRuntime_2(Route, { path: highlightPath || href, controller: matches => jsxRuntime_2(Link, __extends({}, other, { [ReactConstants[5]]: classNames(className, matches && activeClassName) })) });
13
13
  };
14
14
  var NavLink$1 = NavLink;
15
15
 
@@ -39,6 +39,8 @@ const DummyChild = ({id, label, dataConsumer, onClick}) => {
39
39
  return <div className={`DummyChild`} onClick={onClick}>{label || id}</div>
40
40
  };
41
41
 
42
+ const ifString = (s) => isString(s) && s
43
+
42
44
  const prepareSelected = (value) => {
43
45
  let result;
44
46
  if (value != null) {
@@ -372,7 +374,7 @@ class AutocompleteSelect extends PureComponent {
372
374
  } else if (keyCode === 27/*esc*/) {
373
375
  this.setState({
374
376
  isActive: false,
375
- filterValue: isMultipleSelect(mode) ? '' : Object.values(selected)[0] || '',
377
+ filterValue: isMultipleSelect(mode) ? '' : ifString(Object.values(selected)[0]) || '',
376
378
  });
377
379
  this.input.getInput().blur()
378
380
  this.onCancel();
@@ -396,8 +398,7 @@ class AutocompleteSelect extends PureComponent {
396
398
  selected = this.onSelect()
397
399
  }
398
400
 
399
- filterValue = (!isMultipleSelect(mode) && withFilter && Object.values(selected)[0]) || ''
400
- filterValue = isString(filterValue) ? filterValue : ''
401
+ filterValue = (!isMultipleSelect(mode) && withFilter && ifString(Object.values(selected)[0])) || ''
401
402
 
402
403
  this.setState({isActive: false, filterValue});
403
404
  onFilterInputChange && onFilterInputChange(filterValue);
@@ -455,7 +456,7 @@ class AutocompleteSelect extends PureComponent {
455
456
  customValue = label
456
457
  }
457
458
 
458
- let nextFilterValue = (!isMultipleSelect(mode) && withFilter && Object.values(selected)[0]) || ''
459
+ let nextFilterValue = (!isMultipleSelect(mode) && withFilter && ifString(Object.values(selected)[0])) || ''
459
460
  this.setState({
460
461
  isActive: isActive,
461
462
  selected: selected,
@@ -18,7 +18,7 @@ const NavLink: React.FC<NavLinkProps> = (props) => {
18
18
 
19
19
  return <Route
20
20
  path={highlightPath || href}
21
- controller={matches => <Link {...props} className={classNames(className, matches && activeClassName)}/>}
21
+ controller={matches => <Link {...other} className={classNames(className, matches && activeClassName)}/>}
22
22
  />;
23
23
  };
24
24