Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Pass down selectedTab from createProcess to getProcessData
Browse files Browse the repository at this point in the history
Issue #1295
  • Loading branch information
pablosichert committed Oct 31, 2017
1 parent e73296d commit 5da73c5
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/actions/WindowActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ export function createProcess({
rowId,
tabId,
type,
viewId
viewId,
selectedTab
}) {
let pid = null;

Expand All @@ -676,7 +677,8 @@ export function createProcess({
rowId,
tabId,
type,
viewId
viewId,
selectedTab
});
} catch (error) {
// Close process modal in case when process start failed
Expand Down Expand Up @@ -849,11 +851,15 @@ function getProcessData({
payload.rowId = rowId;
}

if (selectedTab) {
payload.selectedTab = {
tabId: selectedTab.tabId,
rowIds: selectedTab.rowIds
};
if (selectedTab && selectedTab.tabId && selectedTab.rowIds) {
const { tabId, rowIds } = selectedTab;

if (tabId && rowIds) {
payload.selectedTab = {
tabId,
rowIds
};
}
}

return axios.post(
Expand Down

0 comments on commit 5da73c5

Please sign in to comment.