Commit 901fc9c0 authored by Maxime Chaillet's avatar Maxime Chaillet

clean the code. It fixes #156.

parent 9fe8b835
......@@ -15,7 +15,6 @@ require("./eventList.css");
*/
class EventList extends React.Component {
collapse(items) {
debugger;
let collapsed = [];
for (let i = 0; i < items.length; i++) {
const event = items[i];
......@@ -83,24 +82,23 @@ class Event extends React.Component {
collapsed: true
}
this.handleClick = this.handleClick.bind(this);
}
handleClick(e) {
this.setState({ collapsed: !this.state.collapsed });
}
getUncollapsedEvents() {
return (<tbody> {this.props.event.events.map((event, index) => {
return this.getEventContentBody(event)
return this.getEventContentBody(event);
})}</tbody>);
}
render() {
debugger
let events = [this.props.event];
if (this.props.event.events && !this.state.collapsed) {
events = events.concat(this.props.event.events);
}
};
return events.map((event, index) => {
return <tr id='contentDocList'>
<td style={{ width: '16px', borderTop: '0' }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment