@festo-ui/react 7.0.0 → 7.1.0-dev.406

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.
@@ -11,7 +11,11 @@ function PopoverMenu(_ref) {
11
11
  ...props
12
12
  } = _ref;
13
13
  const [showPopper, setShowPopper] = useState(false);
14
- const handleClick = item => {
14
+ const handleClick = (e, item) => {
15
+ if (props.stopPropagation) {
16
+ e?.stopPropagation();
17
+ e?.preventDefault();
18
+ }
15
19
  if (item.action) {
16
20
  item.action(item.data);
17
21
  }
@@ -24,7 +28,7 @@ function PopoverMenu(_ref) {
24
28
  children: /*#__PURE__*/_jsxs("button", {
25
29
  type: "button",
26
30
  className: "fwe-btn fwe-btn-link fwe-dark",
27
- onClick: () => handleClick(item),
31
+ onClick: e => handleClick(e, item),
28
32
  children: [/*#__PURE__*/_jsx("i", {
29
33
  className: `fwe-icon fwe-mr-0 ${item.icon}`
30
34
  }), /*#__PURE__*/_jsx("span", {
@@ -17,7 +17,11 @@ function PopoverMenu(_ref) {
17
17
  ...props
18
18
  } = _ref;
19
19
  const [showPopper, setShowPopper] = (0, _react.useState)(false);
20
- const handleClick = item => {
20
+ const handleClick = (e, item) => {
21
+ if (props.stopPropagation) {
22
+ e?.stopPropagation();
23
+ e?.preventDefault();
24
+ }
21
25
  if (item.action) {
22
26
  item.action(item.data);
23
27
  }
@@ -30,7 +34,7 @@ function PopoverMenu(_ref) {
30
34
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
31
35
  type: "button",
32
36
  className: "fwe-btn fwe-btn-link fwe-dark",
33
- onClick: () => handleClick(item),
37
+ onClick: e => handleClick(e, item),
34
38
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("i", {
35
39
  className: `fwe-icon fwe-mr-0 ${item.icon}`
36
40
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/react",
3
- "version": "7.0.0",
3
+ "version": "7.1.0-dev.406",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "exports": {