ywana-core8 0.0.544 → 0.0.545

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/dist/index.umd.js CHANGED
@@ -2156,14 +2156,17 @@
2156
2156
  icon = _ref3$icon === void 0 ? 'description' : _ref3$icon,
2157
2157
  label = _ref3.label,
2158
2158
  actions = _ref3.actions,
2159
- onSelect = _ref3.onSelect;
2159
+ onSelect = _ref3.onSelect,
2160
+ _ref3$selected = _ref3.selected,
2161
+ selected = _ref3$selected === void 0 ? false : _ref3$selected;
2160
2162
 
2161
2163
  function select() {
2162
2164
  if (onSelect) onSelect(id);
2163
2165
  }
2164
2166
 
2167
+ var style = selected ? "selected" : "";
2165
2168
  return /*#__PURE__*/React__default["default"].createElement("div", {
2166
- className: "tree-item final",
2169
+ className: "tree-item final " + style,
2167
2170
  onClick: select
2168
2171
  }, /*#__PURE__*/React__default["default"].createElement(Icon, {
2169
2172
  icon: icon,
@@ -5435,7 +5438,8 @@
5435
5438
  key: item.id,
5436
5439
  id: item.id,
5437
5440
  label: item.name,
5438
- onSelect: select
5441
+ onSelect: select,
5442
+ selected: item.id === pageContext.selected
5439
5443
  }, "item");
5440
5444
  }));
5441
5445
  });