Skip to content

Commit

Permalink
Merge pull request #255 from gisce/hotfix/bug_webclient#378
Browse files Browse the repository at this point in the history
Fixes bug webclient#378
  • Loading branch information
ecarreras authored Nov 11, 2022
2 parents 1ccdb82 + 996ce15 commit af2b06a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/react-ooui",
"version": "1.1.11",
"version": "1.1.12",
"files": [
"dist",
"src",
Expand Down
6 changes: 5 additions & 1 deletion src/views/RootView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ function RootView(props: RootViewProps, ref: any) {
},
});
} else {
const formattedInitialView = initialView && Array.isArray(initialView.id)
? { ...initialView, id: initialView.id[0] }
: initialView;

addNewTab({
title,
action: {
Expand All @@ -454,7 +458,7 @@ function RootView(props: RootViewProps, ref: any) {
context={{ ...rootContext, ...context }}
domain={domain}
setCanWeClose={registerViewCloseFn}
initialView={initialView}
initialView={formattedInitialView}
res_id={res_id}
formDefaultValues={values}
formForcedValues={forced_values}
Expand Down
6 changes: 5 additions & 1 deletion src/widgets/views/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ function Dashboard(props: DashboardProps, ref: any) {
/>
);
} else if (initialView !== undefined) {
const formattedInitialView =
initialView && Array.isArray(initialView.id)
? { ...initialView, id: initialView.id[0] }
: initialView;
childContent = (
<ActionView
action_id={actionId}
Expand All @@ -319,7 +323,7 @@ function Dashboard(props: DashboardProps, ref: any) {
context={context}
domain={domain}
setCanWeClose={() => {}}
initialView={initialView}
initialView={formattedInitialView}
limit={limit}
/>
);
Expand Down

0 comments on commit af2b06a

Please sign in to comment.