This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by piyush on 23/6/17. | |
*/ | |
import React from 'react'; | |
import Select from '../../common/ui/select.js' | |
export default class Close_Task_Modal extends React.Component{ | |
constructor(props){ | |
super(props); | |
this.state= { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Parent extends React.Component{ | |
constructor(props){ | |
super(props) | |
} | |
open(){ | |
let _this = this; | |
var _html = '<div class="collapsible-body" id="'+eleId+'"></div>'; | |
taskdetail = ReactDOM.render(<TaskDetail data={_this.props.data}/>, document.getElementById(eleId)); // Child "TaskDetail" does not get updated props. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class CreateTask extends Component { | |
constructor(props){ | |
super(props); | |
this.state = { | |
checkBoxValues:false | |
} | |
this.handleSubmit = this.handleSubmit.bind(this); | |
} | |
onChange(e){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render(){ | |
let name = this.state.name; | |
return ( | |
<input vaue={name} /> // input field is freeze here even I can see the name in the texfield. Can't edit why ? | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = []; | |
var temp = 10; // says temp is unused | |
arr( | |
{ | |
temp: { // here temp is not recognised | |
a: 10 | |
} | |
} | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{( | |
()=>{ | |
if(fromOperatorFields.length > 0){ | |
return ( | |
fromOperatorFields.map((fields,index)=>{ | |
return <option key={index} value="">{fields.label}</option> | |
}) | |
) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{( | |
() => { | |
if(fromOperatorFields.length > 0) { | |
return <option value="">Select Label</option> | |
} | |
} | |
)()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render(){ | |
return (<select id="selectTemplate" ref={(input) => this.templateSelect = input}> | |
<option value="0" disabled selected>Select Template</option> | |
{( | |
()=>{ | |
console.log("Templates", this.props.templates) | |
return this.props.templates.templates.data.map((template, index) => { | |
console.log("template.id::::::::::", template.id) // fine | |
return <option key={template.id} value={template.attributes.name}>{template.attributes.name}</option> |