@raketa-builder/menu-builder 0.3.0 → 0.4.0
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/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-lint.log +12 -12
- package/dist/index.js +6 -1
- package/package.json +1 -1
- package/src/MenuBuilder/index.js +6 -1
package/.turbo/turbo-build.log
CHANGED
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
$ TIMING=1 eslint "**/*.js"
|
|
2
|
-
Rule
|
|
3
|
-
|
|
4
|
-
react/
|
|
5
|
-
react/
|
|
6
|
-
react/require-render-return
|
|
7
|
-
react
|
|
8
|
-
react/
|
|
9
|
-
react-hooks/rules-of-hooks
|
|
10
|
-
react/no-string-refs
|
|
11
|
-
react/no-unescaped-entities
|
|
12
|
-
react/no-
|
|
13
|
-
|
|
2
|
+
Rule | Time (ms) | Relative
|
|
3
|
+
:---------------------------------|----------:|--------:
|
|
4
|
+
react/display-name | 28.043 | 25.4%
|
|
5
|
+
react/no-direct-mutation-state | 27.800 | 25.2%
|
|
6
|
+
react/require-render-return | 20.287 | 18.4%
|
|
7
|
+
react/no-deprecated | 4.712 | 4.3%
|
|
8
|
+
react-hooks/exhaustive-deps | 4.033 | 3.7%
|
|
9
|
+
react-hooks/rules-of-hooks | 3.917 | 3.5%
|
|
10
|
+
react/no-string-refs | 3.201 | 2.9%
|
|
11
|
+
react/no-unescaped-entities | 2.490 | 2.3%
|
|
12
|
+
react/jsx-no-comment-textnodes | 1.645 | 1.5%
|
|
13
|
+
jsx-a11y/role-supports-aria-props | 1.306 | 1.2%
|
package/dist/index.js
CHANGED
|
@@ -1705,7 +1705,12 @@ var MenuBuilder = ({ widgets, value, onChange }) => {
|
|
|
1705
1705
|
items: state.items,
|
|
1706
1706
|
tab: currentTab,
|
|
1707
1707
|
onTab: (tab) => setState(__spreadProps(__spreadValues({}, state), { tab })),
|
|
1708
|
-
onChange: (items) =>
|
|
1708
|
+
onChange: (items) => {
|
|
1709
|
+
const newState = __spreadProps(__spreadValues({}, state), { items });
|
|
1710
|
+
setState(newState);
|
|
1711
|
+
if (onChange)
|
|
1712
|
+
onChange(newState);
|
|
1713
|
+
}
|
|
1709
1714
|
}
|
|
1710
1715
|
),
|
|
1711
1716
|
currentItem && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
package/package.json
CHANGED
package/src/MenuBuilder/index.js
CHANGED
|
@@ -56,7 +56,12 @@ const MenuBuilder = ({ widgets, value, onChange }) => {
|
|
|
56
56
|
items={state.items}
|
|
57
57
|
tab={currentTab}
|
|
58
58
|
onTab={(tab) => setState({ ...state, tab })}
|
|
59
|
-
onChange={(items) =>
|
|
59
|
+
onChange={(items) => {
|
|
60
|
+
const newState = { ...state, items };
|
|
61
|
+
|
|
62
|
+
setState(newState);
|
|
63
|
+
if (onChange) onChange(newState);
|
|
64
|
+
}}
|
|
60
65
|
/>
|
|
61
66
|
|
|
62
67
|
{currentItem && (
|