interface ProjectPanelDataProps {
paperClassName?: string;
+ onRowClick: (uuid: string) => void;
+ onRowDoubleClick: (uuid: string) => void;
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => void;
};
export const ProjectPanelData = class extends React.Component<ProjectPanelDataProps> {
- handleRowClick = () => {};
- handleRowDoubleClick = () => {};
- handleContextMenu = () => {};
-
render () {
return <DataExplorer
id={PROJECT_PANEL_DATA_ID}
- onRowClick={this.handleRowClick}
- onRowDoubleClick={this.handleRowDoubleClick}
- onContextMenu={this.handleContextMenu}
+ onRowClick={this.props.onRowClick}
+ onRowDoubleClick={this.props.onRowDoubleClick}
+ onContextMenu={this.props.onContextMenu}
contextMenuColumn={true}
defaultViewIcon={ProjectIcon}
defaultViewMessages={DEFAULT_VIEW_MESSAGES}
interface ProjectPanelRunProps {
project?: ProjectResource;
paperClassName?: string;
+ onRowClick: (uuid: string) => void;
+ onRowDoubleClick: (uuid: string) => void;
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, resourceUuid: string) => void;
}
-const mapStateToProps = (state: RootState): ProjectPanelRunProps => {
+const mapStateToProps = (state: RootState): Pick<ProjectPanelRunProps, 'project'> => {
const projectUuid = getProjectPanelCurrentUuid(state) || "";
const project = getResource<ProjectResource>(projectUuid)(state.resources);
return {
};
export const ProjectPanelRun = connect(mapStateToProps)((props: ProjectPanelRunProps) => {
- const handleRowClick = () => {};
- const handleRowDoubleClick = () => {};
- const handleContextMenu = () => {};
-
return <DataExplorer
id={PROJECT_PANEL_RUN_ID}
- onRowClick={handleRowClick}
- onRowDoubleClick={handleRowDoubleClick}
- onContextMenu={handleContextMenu}
+ onRowClick={props.onRowClick}
+ onRowDoubleClick={props.onRowDoubleClick}
+ onContextMenu={props.onContextMenu}
contextMenuColumn={true}
defaultViewIcon={ProjectIcon}
defaultViewMessages={DEFAULT_VIEW_MESSAGES}
xs="auto"
data-cy="process-data"
className={classes.dataExplorer}>
- <ProjectPanelData />
+ <ProjectPanelData
+ onRowClick={this.handleRowClick}
+ onRowDoubleClick={this.handleRowDoubleClick}
+ onContextMenu={this.handleContextMenu}
+ />
</MPVPanelContent>
<MPVPanelContent
forwardProps
xs="auto"
data-cy="process-run"
className={classes.dataExplorer}>
- <ProjectPanelRun />
+ <ProjectPanelRun
+ onRowClick={this.handleRowClick}
+ onRowDoubleClick={this.handleRowDoubleClick}
+ onContextMenu={this.handleContextMenu}
+ />
</MPVPanelContent>
</MPVContainer>
</div>