dtable-ui-component 6.0.117-beta.3 → 6.0.117-beta.5

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.
@@ -40,9 +40,10 @@ const DTableDropdownItem = _ref => {
40
40
  'aria-hidden': 'true'
41
41
  });
42
42
  };
43
- let customItemProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
44
- onClick
45
- });
43
+ let customItemProps = (0, _objectSpread2.default)({}, itemProps);
44
+ if (typeof onClick === 'function') {
45
+ customItemProps.onClick = onClick;
46
+ }
46
47
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem, (0, _objectSpread2.default)((0, _objectSpread2.default)({
47
48
  className: className,
48
49
  disabled: disabled,
@@ -13,14 +13,21 @@ const DTableDropdownMenu = _ref => {
13
13
  let {
14
14
  className,
15
15
  container,
16
+ modifiers,
16
17
  style,
17
18
  menuProps,
18
19
  children
19
20
  } = _ref;
20
- let customMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, menuProps), {}, {
21
- container,
22
- style
23
- });
21
+ let customMenuProps = (0, _objectSpread2.default)({}, menuProps);
22
+ if (container) {
23
+ customMenuProps.container = container;
24
+ }
25
+ if (style) {
26
+ customMenuProps.style = style;
27
+ }
28
+ if (Array.isArray(modifiers)) {
29
+ customMenuProps.modifiers = modifiers;
30
+ }
24
31
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownMenu, (0, _objectSpread2.default)((0, _objectSpread2.default)({
25
32
  className: (0, _classnames.default)('dtable-dropdown-menu', className)
26
33
  }, customMenuProps), {}, {
@@ -13,14 +13,21 @@ const DTableSubDropdownMenu = _ref => {
13
13
  let {
14
14
  className,
15
15
  container,
16
+ modifiers,
16
17
  style,
17
18
  menuProps,
18
19
  children
19
20
  } = _ref;
20
- let customMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, menuProps), {}, {
21
- container,
22
- style
23
- });
21
+ let customMenuProps = (0, _objectSpread2.default)({}, menuProps);
22
+ if (container) {
23
+ customMenuProps.container = container;
24
+ }
25
+ if (style) {
26
+ customMenuProps.style = style;
27
+ }
28
+ if (Array.isArray(modifiers)) {
29
+ customMenuProps.modifiers = modifiers;
30
+ }
24
31
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownMenu.default, {
25
32
  className: (0, _classnames.default)('dtable-sub-dropdown-menu', className),
26
33
  menuProps: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, customMenuProps), {}, {
@@ -55,12 +55,14 @@ const RoleStatusEditor = _ref => {
55
55
  }],
56
56
  children: menuOptions.map(option => {
57
57
  const {
58
- value
58
+ value,
59
+ label
59
60
  } = option;
60
61
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownItem.default, {
61
62
  onClick: () => handleClickMenuOption(option),
62
63
  showChecked: true,
63
- checked: currentOption.value === value
64
+ checked: currentOption.value === value,
65
+ content: label
64
66
  }, "item-".concat(value));
65
67
  })
66
68
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.117-beta.3",
3
+ "version": "6.0.117-beta.5",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^5.0.8",