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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e4eecc53c4
commit
f210ec809f
@@ -72,7 +72,10 @@ export class TimelineDataDescription extends Component<Props, State> {
|
||||
<div>
|
||||
<MarkerTimeline
|
||||
points={points}
|
||||
onClick={(ids) => this.setState({selected: ids[0]})}
|
||||
onClick={(ids) => {
|
||||
this.setState({selected: ids[0]});
|
||||
this.props.onClick?.(ids[0]);
|
||||
}}
|
||||
maxGap={50}
|
||||
selected={this.state.selected}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user