OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
2.98k stars 3.12k forks source link

[Bug] navigateHistory command is not available on startup #4241

Open mbellehumeur opened 1 week ago

mbellehumeur commented 1 week ago

Describe the Bug

The navigateHistory command of commandsManager is initialized in Mode.tsx therefore it is not available right after the client is started; before a study is opened. Adding the initialization in Worklist.tsx (in addition to Mode.tsx) fixed the problem for me: // Expose the react router dom navigation history.navigate = useNavigate();

Steps to Reproduce

Call: commandsManager.runCommand('navigateHistory',{to:'/viewer?StudyInstanceUIDs='+studyUID}); } after client startup. The error is 'navigate function does not exist'.

The current behavior

The navigateHistory command fails and the study does not open.

The expected behavior

The navigateHistory command runs and the study opens.

OS

macOS

Node version

18

Browser

Chrome