Skip to content

Commit

Permalink
[frontend] Fix the selected field in suggestion (#9586)
Browse files Browse the repository at this point in the history
  • Loading branch information
CelineSebe authored Jan 14, 2025
1 parent f7549fc commit e25c747
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ const ContainerHeader = (props) => {
containerId={container.id}
currentMode={currentMode}
onApplied={onApplied}
instanceName={getMainRepresentative(container)}
containerHeaderObjectsQuery={containerHeaderObjectsQuery}
container={container}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from '@mui/material';
import { AddTaskOutlined, AssistantOutlined } from '@mui/icons-material';
import { useTheme } from '@mui/styles';
import { getMainRepresentative } from '../../../../utils/defaultRepresentatives';
import { commitMutation, MESSAGING$, QueryRenderer } from '../../../../relay/environment';
import { stixCoreRelationshipCreationMutation } from '../stix_core_relationships/StixCoreRelationshipCreation';
import { containerAddStixCoreObjectsLinesRelationAddMutation } from '../containers/ContainerAddStixCoreObjectsLines';
Expand All @@ -33,7 +34,6 @@ const StixCoreObjectsSuggestionsComponent = (props) => {
container,
currentMode,
onApplied,
instanceName,
containerHeaderObjectsQuery,
} = props;
const theme = useTheme();
Expand Down Expand Up @@ -370,8 +370,11 @@ const StixCoreObjectsSuggestionsComponent = (props) => {
value={selectedEntity[suggestion.type]}
>
{suggestion.data.map((object) => (
<MenuItem key={object.id} value={object.id}>
{instanceName}
<MenuItem
key={object.id}
value={object.id}
>
{getMainRepresentative(object)}
</MenuItem>
))}
</Select>
Expand Down

0 comments on commit e25c747

Please sign in to comment.