Skip to content

Commit e25c747

Browse files
authored
[frontend] Fix the selected field in suggestion (#9586)
1 parent f7549fc commit e25c747

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

opencti-platform/opencti-front/src/private/components/common/containers/ContainerHeader.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ const ContainerHeader = (props) => {
655655
containerId={container.id}
656656
currentMode={currentMode}
657657
onApplied={onApplied}
658-
instanceName={getMainRepresentative(container)}
659658
containerHeaderObjectsQuery={containerHeaderObjectsQuery}
660659
container={container}
661660
/>

opencti-platform/opencti-front/src/private/components/common/stix_core_objects/StixCoreObjectsSuggestions.jsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
} from '@mui/material';
2020
import { AddTaskOutlined, AssistantOutlined } from '@mui/icons-material';
2121
import { useTheme } from '@mui/styles';
22+
import { getMainRepresentative } from '../../../../utils/defaultRepresentatives';
2223
import { commitMutation, MESSAGING$, QueryRenderer } from '../../../../relay/environment';
2324
import { stixCoreRelationshipCreationMutation } from '../stix_core_relationships/StixCoreRelationshipCreation';
2425
import { containerAddStixCoreObjectsLinesRelationAddMutation } from '../containers/ContainerAddStixCoreObjectsLines';
@@ -33,7 +34,6 @@ const StixCoreObjectsSuggestionsComponent = (props) => {
3334
container,
3435
currentMode,
3536
onApplied,
36-
instanceName,
3737
containerHeaderObjectsQuery,
3838
} = props;
3939
const theme = useTheme();
@@ -370,8 +370,11 @@ const StixCoreObjectsSuggestionsComponent = (props) => {
370370
value={selectedEntity[suggestion.type]}
371371
>
372372
{suggestion.data.map((object) => (
373-
<MenuItem key={object.id} value={object.id}>
374-
{instanceName}
373+
<MenuItem
374+
key={object.id}
375+
value={object.id}
376+
>
377+
{getMainRepresentative(object)}
375378
</MenuItem>
376379
))}
377380
</Select>

0 commit comments

Comments
 (0)