dtable-ui-component 6.0.117-beta.7 → 6.0.117-beta.9

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.
@@ -16,6 +16,7 @@ const DTableDropdownItem = _ref => {
16
16
  className,
17
17
  divider,
18
18
  id,
19
+ toggle,
19
20
  disabled,
20
21
  tooltip,
21
22
  itemProps,
@@ -25,7 +26,9 @@ const DTableDropdownItem = _ref => {
25
26
  rightSlotContent,
26
27
  icon,
27
28
  content,
28
- onClick
29
+ onClick,
30
+ style,
31
+ tabIndex
29
32
  } = _ref;
30
33
  if (divider) {
31
34
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownItem, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemProps), {}, {
@@ -44,6 +47,15 @@ const DTableDropdownItem = _ref => {
44
47
  if (typeof onClick === 'function') {
45
48
  customItemProps.onClick = onClick;
46
49
  }
50
+ if (typeof toggle === 'boolean') {
51
+ customItemProps.toggle = toggle;
52
+ }
53
+ if (style) {
54
+ customItemProps.style = style;
55
+ }
56
+ if (typeof tabIndex === 'number') {
57
+ customItemProps.tabIndex = tabIndex;
58
+ }
47
59
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactstrap.DropdownItem, (0, _objectSpread2.default)((0, _objectSpread2.default)({
48
60
  className: className,
49
61
  disabled: disabled,
@@ -11,6 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  const DTableDropdownMenu = _ref => {
13
13
  let {
14
+ id,
14
15
  className,
15
16
  container,
16
17
  modifiers,
@@ -19,7 +20,15 @@ const DTableDropdownMenu = _ref => {
19
20
  menuProps,
20
21
  children
21
22
  } = _ref;
22
- let customMenuProps = (0, _objectSpread2.default)({}, menuProps);
23
+ let customMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, menuProps), {}, {
24
+ flip: false
25
+ });
26
+ customMenuProps.modifiers = [{
27
+ name: 'preventOverflow',
28
+ options: {
29
+ boundary: document.body
30
+ }
31
+ }, ...((customMenuProps === null || customMenuProps === void 0 ? void 0 : customMenuProps.modifiers) || [])];
23
32
  if (container) {
24
33
  customMenuProps.container = container;
25
34
  }
@@ -33,6 +42,7 @@ const DTableDropdownMenu = _ref => {
33
42
  customMenuProps.flip = flip;
34
43
  }
35
44
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactstrap.DropdownMenu, (0, _objectSpread2.default)((0, _objectSpread2.default)({
45
+ id: id,
36
46
  className: (0, _classnames.default)('dtable-dropdown-menu', className)
37
47
  }, customMenuProps), {}, {
38
48
  children: children
@@ -11,6 +11,7 @@ var _DTableDropdownMenu = _interopRequireDefault(require("../DTableDropdownMenu"
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  const DTableSubDropdownMenu = _ref => {
13
13
  let {
14
+ id,
14
15
  className,
15
16
  container,
16
17
  modifiers,
@@ -19,7 +20,9 @@ const DTableSubDropdownMenu = _ref => {
19
20
  menuProps,
20
21
  children
21
22
  } = _ref;
22
- let customMenuProps = (0, _objectSpread2.default)({}, menuProps);
23
+ let customMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, menuProps), {}, {
24
+ flip: false
25
+ });
23
26
  if (container) {
24
27
  customMenuProps.container = container;
25
28
  }
@@ -33,9 +36,15 @@ const DTableSubDropdownMenu = _ref => {
33
36
  customMenuProps.flip = flip;
34
37
  }
35
38
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownMenu.default, {
39
+ id: id,
36
40
  className: (0, _classnames.default)('dtable-sub-dropdown-menu', className),
37
41
  menuProps: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, customMenuProps), {}, {
38
42
  modifiers: [{
43
+ name: 'preventOverflow',
44
+ options: {
45
+ boundary: document.body
46
+ }
47
+ }, {
39
48
  name: 'offset',
40
49
  options: {
41
50
  offset: [-8, -1]
@@ -47,12 +47,6 @@ const RoleStatusEditor = _ref => {
47
47
  })]
48
48
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DTableDropdownMenu.default, {
49
49
  className: "position-fixed",
50
- modifiers: [{
51
- name: 'preventOverflow',
52
- options: {
53
- boundary: document.body
54
- }
55
- }],
56
50
  children: menuOptions.map(option => {
57
51
  const {
58
52
  value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "6.0.117-beta.7",
3
+ "version": "6.0.117-beta.9",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^5.0.8",