-const mapStateToProps = (state: RootState, { id, columns }: Props) => {
- const s = getDataExplorer(state.dataExplorer, id);
- if (s.columns.length === 0) {
- s.columns = columns;
- }
- return s;
+const mapStateToProps = (state: RootState, { id, working: parentWorking }: Props) => {
+ const progress = state.progressIndicator.find(p => p.id === id);
+ const working = (progress && progress.working) || parentWorking;
+ const currentRoute = state.router.location ? state.router.location.pathname : '';
+ const currentItemUuid = currentRoute === '/workflows' ? state.properties.workflowPanelDetailsUuid : state.detailsPanel.resourceUuid;
+ return { ...getDataExplorer(state.dataExplorer, id), working, paperKey: currentRoute, currentItemUuid };