Author: jruchaud Date: 2015-05-26 14:32:02 +0000 (Tue, 26 May 2015) New Revision: 1493 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1493 Log: Change getInitialState Modified: wit/js/components/FilterLogs.js wit/js/components/InputTag.js wit/js/components/Tags.js wit/js/components/Time.js wit/js/components/Timeline.js Modified: wit/js/components/FilterLogs.js =================================================================== --- wit/js/components/FilterLogs.js 2015-05-26 14:28:38 UTC (rev 1492) +++ wit/js/components/FilterLogs.js 2015-05-26 14:32:02 UTC (rev 1493) @@ -5,8 +5,10 @@ class FilterLogs extends React.Component { - contructor() { + constructor(props) { + super(props); this.printer = new Printer(); + this.state = {data: null, tags: {}}; } onClipboardCSV() { @@ -40,10 +42,6 @@ this.refs.filterTags.getDOMNode().classList.toggle("hidden"); } - getInitialState() { - return {data: null, tags: {}}; - } - componentWillReceiveProps(nextProps) { this.createTree(nextProps); } Modified: wit/js/components/InputTag.js =================================================================== --- wit/js/components/InputTag.js 2015-05-26 14:28:38 UTC (rev 1492) +++ wit/js/components/InputTag.js 2015-05-26 14:32:02 UTC (rev 1493) @@ -5,8 +5,9 @@ class InputTag extends React.Component { - getInitialState() { - return {options: [], value: ""}; + constructor(props) { + super(props); + this.state = {options: [], value: ""}; } getTags() { Modified: wit/js/components/Tags.js =================================================================== --- wit/js/components/Tags.js 2015-05-26 14:28:38 UTC (rev 1492) +++ wit/js/components/Tags.js 2015-05-26 14:32:02 UTC (rev 1493) @@ -5,8 +5,9 @@ class Tags extends React.Component { - getInitialState() { - return timer; + constructor(props) { + super(props); + this.state = timer; } componentDidMount() { Modified: wit/js/components/Time.js =================================================================== --- wit/js/components/Time.js 2015-05-26 14:28:38 UTC (rev 1492) +++ wit/js/components/Time.js 2015-05-26 14:32:02 UTC (rev 1493) @@ -5,8 +5,9 @@ class Time extends React.Component { - getInitialState() { - return timer; + constructor(props) { + super(props); + this.state = timer; } componentDidMount() { Modified: wit/js/components/Timeline.js =================================================================== --- wit/js/components/Timeline.js 2015-05-26 14:28:38 UTC (rev 1492) +++ wit/js/components/Timeline.js 2015-05-26 14:32:02 UTC (rev 1493) @@ -7,10 +7,9 @@ class Timeline extends React.Component { - getInitialState() { - return { - sessions: [] - }; + constructor(props) { + super(props); + this.state = {sessions: []}; } componentDidMount() {
participants (1)
-
jruchaud@users.nuiton.org