@steroidsjs/core 2.2.107 → 2.2.109
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/package.json +1 -1
- package/ui/nav/Router/Router.js +4 -4
package/package.json
CHANGED
package/ui/nav/Router/Router.js
CHANGED
|
@@ -143,16 +143,17 @@ var renderComponent = function (route, activePath, routeProps) {
|
|
|
143
143
|
function Router(props) {
|
|
144
144
|
var components = hooks_1.useComponents();
|
|
145
145
|
var _a = hooks_1.useSelector(function (state) {
|
|
146
|
-
var _a, _b;
|
|
146
|
+
var _a, _b, _c, _d;
|
|
147
147
|
return ({
|
|
148
148
|
isInitialized: router_2.isRouterInitialized(state),
|
|
149
149
|
pathname: get_1["default"](state, 'router.location.pathname'),
|
|
150
150
|
route: router_2.getRoute(state),
|
|
151
151
|
routeParams: state.router.params,
|
|
152
152
|
activePath: (_b = (_a = state.router) === null || _a === void 0 ? void 0 : _a.location) === null || _b === void 0 ? void 0 : _b.pathname,
|
|
153
|
+
query: (_d = (_c = state.router) === null || _c === void 0 ? void 0 : _c.location) === null || _d === void 0 ? void 0 : _d.query,
|
|
153
154
|
activeRouteIds: router_2.getActiveRouteIds(state)
|
|
154
155
|
});
|
|
155
|
-
}), isInitialized = _a.isInitialized, pathname = _a.pathname, route = _a.route, routeParams = _a.routeParams, activePath = _a.activePath, activeRouteIds = _a.activeRouteIds;
|
|
156
|
+
}), isInitialized = _a.isInitialized, pathname = _a.pathname, route = _a.route, routeParams = _a.routeParams, activePath = _a.activePath, query = _a.query, activeRouteIds = _a.activeRouteIds;
|
|
156
157
|
var routeId = (route === null || route === void 0 ? void 0 : route.id) || null;
|
|
157
158
|
// Init routes in redux
|
|
158
159
|
var dispatch = useDispatch_1["default"]();
|
|
@@ -213,8 +214,7 @@ function Router(props) {
|
|
|
213
214
|
return activeRoute && activeRoute.role !== exports.ROUTER_ROLE_MODAL;
|
|
214
215
|
});
|
|
215
216
|
if (parentRouteId) {
|
|
216
|
-
|
|
217
|
-
dispatch(router_1.goToRoute(parentRouteId));
|
|
217
|
+
dispatch(router_1.goToRoute(parentRouteId, __assign(__assign({}, routeParams), query)));
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
});
|