From f210ec809f4028e114b585bd81a78e1d2300e549 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Mon, 3 Apr 2023 10:35:15 -0700 Subject: [PATCH] Propagate onClick for TimelineDataDescription Summary: `onClick` was not getting called if it wasn't paired with `canSetCurrent`. Ultimately, we can benefit from propagating this event in all cases as to give indication of whenever a marker has been selected. Reviewed By: antonk52, aigoncharov Differential Revision: D44628819 fbshipit-source-id: bee910b48ad065d7479e247fbacdcd738f281b26 --- .../src/ui/data-inspector/TimelineDataDescription.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-plugin/src/ui/data-inspector/TimelineDataDescription.tsx b/desktop/flipper-plugin/src/ui/data-inspector/TimelineDataDescription.tsx index 000d6dec2..70e937a92 100644 --- a/desktop/flipper-plugin/src/ui/data-inspector/TimelineDataDescription.tsx +++ b/desktop/flipper-plugin/src/ui/data-inspector/TimelineDataDescription.tsx @@ -72,7 +72,10 @@ export class TimelineDataDescription extends Component {
this.setState({selected: ids[0]})} + onClick={(ids) => { + this.setState({selected: ids[0]}); + this.props.onClick?.(ids[0]); + }} maxGap={50} selected={this.state.selected} />