@steroidsjs/core 2.1.0-beta.32 → 2.1.0-beta.33

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": "@steroidsjs/core",
3
- "version": "2.1.0-beta.32",
3
+ "version": "2.1.0-beta.33",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {
@@ -43,17 +43,18 @@ var useDispatch_1 = __importDefault(require("../../../hooks/useDispatch"));
43
43
  function LayoutNames(props) {
44
44
  var components = hooks_1.useComponents();
45
45
  var dispatch = useDispatch_1["default"]();
46
+ var list = props.list || {};
46
47
  var onChange = react_1.useCallback(function (value) {
47
48
  components.clientStorage.set(props.attribute, value);
48
- dispatch(list_1.listSetLayout(props.list.listId, value));
49
- }, [components.clientStorage, dispatch, props.attribute, props.list.listId]);
49
+ dispatch(list_1.listSetLayout(list.listId, value));
50
+ }, [components.clientStorage, dispatch, list.listId, props.attribute]);
50
51
  if (props.enable === false) {
51
52
  return null;
52
53
  }
53
54
  var defaultComponent = require('../../nav/Nav')["default"];
54
55
  return components.ui.renderView(props.view || defaultComponent, {
55
56
  items: props.items,
56
- activeTab: props.list.layoutName || null,
57
+ activeTab: list.layoutName || null,
57
58
  onChange: onChange
58
59
  }, true);
59
60
  }