SHARE
TWEET

Untitled

a guest Mar 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <AuditLogTimeline
  2.             data={this.props.visData}
  3.             render={ref => <TimelineWrapper ref={ref} />}
  4.           />
  5.           {/* <AuditLogTimeline data={this.props.visData}>
  6.             {ref => <TimelineWrapper ref={ref} />}
  7.           </AuditLogTimeline> */}
  8.           {/* <AuditLogTimeline
  9.             data={this.props.visData}
  10.             render={TimelineWrapper}
  11.           /> */}
  12.  
  13.  
  14. class AuditLogTimeline extends Component {
  15.   constructor() {
  16.     super()
  17.     this.Timeline = {}
  18.     this.appRef = createRef()
  19.   }
  20.  
  21.   componentDidMount() {
  22.     this.Timeline = new vis.Timeline(
  23.       this.appRef.current,
  24.       this.props.data,
  25.       options
  26.     )
  27.   }
  28.  
  29.   componentDidUpdate = (prevProps, prevState) => {
  30.     this.Timeline.setItems(this.props.data)
  31.   }
  32.  
  33.   render() {
  34.     // return this.props.children(this.appRef)
  35.     return this.props.render(this.appRef)
  36.     // return <TimelineWrapper ref={this.appRef} />
  37.     // return <TimelineWrapper ref={this.appRef} />
  38.   }
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top