@steroidsjs/core 3.0.78 → 3.0.79
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/docs-autogen-result.json +17 -0
- package/package.json +1 -1
- package/ui/nav/Nav/Nav.d.ts +4 -0
- package/ui/nav/Nav/Nav.js +1 -10
package/docs-autogen-result.json
CHANGED
|
@@ -39151,6 +39151,15 @@
|
|
|
39151
39151
|
"type": "React.ReactNode | {}",
|
|
39152
39152
|
"example": "MyCustomView",
|
|
39153
39153
|
"defaultValue": null
|
|
39154
|
+
},
|
|
39155
|
+
{
|
|
39156
|
+
"name": "viewProps",
|
|
39157
|
+
"decorators": [],
|
|
39158
|
+
"description": "Свойства для view компонента",
|
|
39159
|
+
"required": false,
|
|
39160
|
+
"type": "any",
|
|
39161
|
+
"example": null,
|
|
39162
|
+
"defaultValue": null
|
|
39154
39163
|
}
|
|
39155
39164
|
],
|
|
39156
39165
|
"methods": [
|
|
@@ -39248,6 +39257,14 @@
|
|
|
39248
39257
|
"required": false,
|
|
39249
39258
|
"type": "React.ReactNode | {}",
|
|
39250
39259
|
"example": "MyCustomView"
|
|
39260
|
+
},
|
|
39261
|
+
{
|
|
39262
|
+
"name": "viewProps",
|
|
39263
|
+
"decorators": [],
|
|
39264
|
+
"description": "Свойства для view компонента",
|
|
39265
|
+
"required": false,
|
|
39266
|
+
"type": "any",
|
|
39267
|
+
"example": null
|
|
39251
39268
|
}
|
|
39252
39269
|
],
|
|
39253
39270
|
"methods": [
|
package/package.json
CHANGED
package/ui/nav/Nav/Nav.d.ts
CHANGED
|
@@ -99,6 +99,10 @@ export interface INavProps {
|
|
|
99
99
|
* @example MyCustomView
|
|
100
100
|
*/
|
|
101
101
|
view?: CustomView;
|
|
102
|
+
/**
|
|
103
|
+
* Свойства для view компонента
|
|
104
|
+
*/
|
|
105
|
+
viewProps?: CustomViewProps;
|
|
102
106
|
/**
|
|
103
107
|
* Обработчик, который вызывается при смене активного элемента навигации
|
|
104
108
|
* @param args
|
package/ui/nav/Nav/Nav.js
CHANGED
|
@@ -110,16 +110,7 @@ function Nav(props) {
|
|
|
110
110
|
.filter(function (item) { return item.visible !== false; });
|
|
111
111
|
}, [activeRouteIds, activeTab, props.items, routerParams, routes]);
|
|
112
112
|
var items = (0, react_1.useMemo)(function () { return formatItems(); }, [formatItems]);
|
|
113
|
-
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
114
|
-
items: items,
|
|
115
|
-
onClick: onClick,
|
|
116
|
-
disabled: props.disabled,
|
|
117
|
-
size: props.size,
|
|
118
|
-
icon: props.icon,
|
|
119
|
-
className: props.className,
|
|
120
|
-
navClassName: props.navClassName,
|
|
121
|
-
children: renderContent()
|
|
122
|
-
}); }, [items, onClick, props.className, props.disabled, props.icon, props.navClassName, props.size, renderContent]);
|
|
113
|
+
var viewProps = (0, react_1.useMemo)(function () { return (__assign(__assign({}, props.viewProps), { items: items, onClick: onClick, disabled: props.disabled, size: props.size, icon: props.icon, className: props.className, navClassName: props.navClassName, children: renderContent() })); }, [items, onClick, props.className, props.disabled, props.icon, props.navClassName, props.size, props.viewProps, renderContent]);
|
|
123
114
|
return components.ui.renderView(props.view || defaultViewMap[props.layout], viewProps);
|
|
124
115
|
}
|
|
125
116
|
Nav.defaultProps = {
|