fix(WindowLevelActionMenu): The window level menu must show different contents for 3D volume viewports (#5113)

This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2025-06-07 13:55:33 -04:00
1 parent 2234121a19
commit 0afb3fc753
5 files changed
+50 -37

No files matched your search

@@ -2,17 +2,14 @@ import { Icons, FooterAction } from '@ohif/ui-next';
import React, { ReactElement, useState, useCallback } from 'react';
import { PresetDialog } from '@ohif/ui-next';
import { ViewportPreset, VolumeRenderingPresetsContentProps } from '../../types/ViewportPresets';
import { useSystem } from '@ohif/core';
interface Props extends VolumeRenderingPresetsContentProps {
hide: () => void;
}
export function VolumeRenderingPresetsContent({
presets,
viewportId,
commandsManager,
hide,
}: Props): ReactElement {
export function VolumeRenderingPresetsContent({ presets, viewportId, hide }: Props): ReactElement {
const { commandsManager } = useSystem();
const [searchValue, setSearchValue] = useState('');
const [selectedPreset, setSelectedPreset] = useState<ViewportPreset | null>(null);
@@ -53,7 +53,6 @@ export function WindowLevelActionMenuContent({
return (
<AllInOneMenu.Menu
menuKey={menuKey}
key={menuKey}
// the visibility is handled by the parent component
isVisible={true}