avoid lambda props

This fixes the simple cases of callback props using lambda functions.
This will prevent rerendering in some cases since a new callback
function is not created on each call.
This commit is contained in:
David Lechner
2022-03-12 15:19:50 -06:00
parent c229d407cf
commit de7e046d31
7 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ const ActionButton: React.FC<ActionButtonProps> = (props) => {
{...tooltipTargetProps}
intent={Intent.PRIMARY}
onMouseDown={preventFocusOnClick}
onClick={() => props.onAction()}
onClick={props.onAction}
disabled={props.enabled === false}
style={
props.enabled === false ? { pointerEvents: 'none' } : undefined