react-ui-basics 0.0.234 → 0.0.236

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.234",
3
+ "version": "0.0.236",
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
 
@@ -147,6 +147,8 @@ class AutocompleteSelect extends PureComponent {
147
147
  this.initSelected(__props(this), __state(this))
148
148
  if (__state(this).isActive && !prevState.isActive)
149
149
  this.updateListPosition()
150
+ if (__state(this).isActive !== !prevState.isActive)
151
+ orNoop(__props(this).onIsActiveChange)(__state(this).isActive)
150
152
  }
151
153
 
152
154
  initSelected = ({value, mode, allowCustom, withFilter}, {filterValue = ''}) => {
@@ -226,7 +228,9 @@ class AutocompleteSelect extends PureComponent {
226
228
  const hasSelected = __length(selectedIds) !== 0;
227
229
  const setActive = (e) => {
228
230
  stopPropagation(e);
229
- this.setState({isActive: true}, () => (scrollToValue && __length(selectedIds) > 0) && this.list.selected(selectedIds[0]));
231
+ this.setState({isActive: true}, () => {
232
+ scrollToValue && __length(selectedIds) > 0 && data.includes(selectedIds[0]) && this.list.selected(selectedIds[0]);
233
+ });
230
234
  };
231
235
  const toggle = (e) => {
232
236
  if (!__state(this).isActive) {
@@ -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