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.
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