hide side nav when viewing process model w/ burnettk

This commit is contained in:
jasquat 2025-02-11 12:24:01 -05:00
parent a9374c15d1
commit 153c02263f
No known key found for this signature in database
2 changed files with 10 additions and 0 deletions

View File

@ -32,6 +32,7 @@ export default function ProcessModelCard({
stream, stream,
lastSelected, lastSelected,
onStartProcess, onStartProcess,
onViewProcess,
processModelAction, processModelAction,
}: { }: {
model: Record<string, any>; model: Record<string, any>;
@ -39,6 +40,7 @@ export default function ProcessModelCard({
stream?: Subject<Record<string, any>>; stream?: Subject<Record<string, any>>;
lastSelected?: Record<string, any>; lastSelected?: Record<string, any>;
onStartProcess?: () => void; onStartProcess?: () => void;
onViewProcess?: () => void;
}) { }) {
const [selectedStyle, setSelectedStyle] = const [selectedStyle, setSelectedStyle] =
useState<Record<string, any>>(defaultStyle); useState<Record<string, any>>(defaultStyle);
@ -64,6 +66,9 @@ export default function ProcessModelCard({
const handleViewProcess = (e: PointerEvent) => { const handleViewProcess = (e: PointerEvent) => {
stopEventBubble(e); stopEventBubble(e);
if (onViewProcess) {
onViewProcess();
}
const modifiedProcessModelId = modifyProcessIdentifierForPathParam( const modifiedProcessModelId = modifyProcessIdentifierForPathParam(
model.id, model.id,
); );

View File

@ -450,6 +450,11 @@ export default function ProcessModelTreePage({
setNavElementCallback(null); setNavElementCallback(null);
} }
}} }}
onViewProcess={() => {
if (setNavElementCallback) {
setNavElementCallback(null);
}
}}
/> />
))} ))}
</Box> </Box>