[Metrics UI] Don't render node if group width is 0 or NaN (#98980)
* don't render nodes if squareSize is NaN * check group.width instead of squareSize * fix react warning
This commit is contained in:
parent
6130f16a6e
commit
f2693edddc
|
@ -43,18 +43,20 @@ export const GroupOfNodes: React.FC<Props> = ({
|
|||
<GroupOfNodesContainer style={{ width }}>
|
||||
<GroupName group={group} onDrilldown={onDrilldown} isChild={isChild} options={options} />
|
||||
<Nodes>
|
||||
{group.nodes.map((node) => (
|
||||
<Node
|
||||
key={`${node.pathId}:${node.name}`}
|
||||
options={options}
|
||||
squareSize={group.squareSize}
|
||||
node={node}
|
||||
formatter={formatter}
|
||||
bounds={bounds}
|
||||
nodeType={nodeType}
|
||||
currentTime={currentTime}
|
||||
/>
|
||||
))}
|
||||
{group.width
|
||||
? group.nodes.map((node) => (
|
||||
<Node
|
||||
key={`${node.pathId}:${node.name}`}
|
||||
options={options}
|
||||
squareSize={group.squareSize}
|
||||
node={node}
|
||||
formatter={formatter}
|
||||
bounds={bounds}
|
||||
nodeType={nodeType}
|
||||
currentTime={currentTime}
|
||||
/>
|
||||
))
|
||||
: null}
|
||||
</Nodes>
|
||||
</GroupOfNodesContainer>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue