Skip to content

Commit

Permalink
Pass props on wrapper and not data provider
Browse files Browse the repository at this point in the history
  • Loading branch information
kqualters-elastic committed May 9, 2022
1 parent 990e15f commit db52dd2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export const EntityDraggableComponent: React.FC<Props> = ({
value: entityValue,
operator: IS_OPERATOR as QueryOperator,
},
isAggregatable: true,
fieldType: 'keyword',
}),
[entityName, entityValue, id]
);
Expand All @@ -58,7 +56,15 @@ export const EntityDraggableComponent: React.FC<Props> = ({
[entityName, entityValue]
);

return <DraggableWrapper key={id} dataProvider={dataProviderProp} render={render} />;
return (
<DraggableWrapper
key={id}
dataProvider={dataProviderProp}
render={render}
isAggregatable={true}
fieldType={'keyword'}
/>
);
};

EntityDraggableComponent.displayName = 'EntityDraggableComponent';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export const DraggableScoreComponent = ({
value: score.entityValue,
operator: IS_OPERATOR as QueryOperator,
},
isAggregatable: true,
fieldType: 'number',
}),
[id, score.entityName, score.entityValue]
);
Expand Down Expand Up @@ -71,6 +69,8 @@ export const DraggableScoreComponent = ({
key={`draggable-score-draggable-wrapper-${id}`}
dataProvider={dataProviderProp}
render={render}
isAggregatable={true}
fieldType={'keyword'}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ export const DraggableSignatureId = React.memo<{

return (
<SignatureFlexItem grow={false}>
<DraggableWrapper dataProvider={dataProviderProp} isDraggable={isDraggable} render={render} />
<DraggableWrapper
dataProvider={dataProviderProp}
isDraggable={isDraggable}
render={render}
isAggregatable={true}
fieldType={'keyword'}
/>
</SignatureFlexItem>
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ export const DraggableZeekElement = React.memo<{

return value != null ? (
<TokensFlexItem grow={false}>
<DraggableWrapper dataProvider={dataProviderProp} isDraggable={isDraggable} render={render} />
<DraggableWrapper
dataProvider={dataProviderProp}
isDraggable={isDraggable}
render={render}
isAggregatable={true}
fieldType={'keyword'}
/>
</TokensFlexItem>
) : null;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export const getUserRiskScoreColumns = ({
<UserDetailsLink userName={userName} />
)
}
isAggregatable={true}
fieldType={'keyword'}
/>
);
}
Expand Down

0 comments on commit db52dd2

Please sign in to comment.