Can you be able to share sample code may be in a codesandbox or codepen, so that others can look at the code and try to see if they can fix this bug Have you posted in stackoverflow.com already?
import React, { Component } from 'react'; import { Card, CardTitle, CardBody, CardHeader, CardFooter, Collapse, Dropdown, DropdownItem, DropdownMenu, DropdownToggle, InputGroup, Form, Input, Button, Row, Col, Label, ButtonGroup } from 'reactstrap'; import { connect } from 'react-redux'; // import { Control, Form, Errors, actions } from 'react-redux-form'; import { withRouter } from "react-router-dom";
class QuestionHeaderModalForm extends Component { constructor(props) { super(props); this.onSubmit = this.onSubmit.bind(this); this.onCancel = this.onCancel.bind(this); this.state = { rsDropDownOpen:false, item: { name:"", description:"", isvendor:false, isinternal:false, isreference:false } }; this.toggleRSDropDown = this.toggleRSDropDown.bind(this) }
toggleRSDropDown() { this.setState({rsDropDownOpen: !this.state.rsDropDownOpen}) }
onSubmit(values) { console.log('values in onsubmit are:' + JSON.stringify(values.desc)); // this.props.onSubmitInitiative(values) }
onDelete(values) { // this.props.onDelete(values) }
onCancel() { // this.props.history.push('/initiatives'); console.log('oncancel called') }
render() { let deleteButton; if (this.props.initiative) { deleteButton =
const existingRSItems = this.props.reqSections.reqSections.map(function (rsItem, index) { return ( {rsItem.name} ); });
return (
export default withRouter(connect()(QuestionHeaderModalForm));
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can you be able to share sample code
may be in a codesandbox or codepen, so that others can look at the code and try to see if they can fix this bug
Have you posted in stackoverflow.com already?
import React, { Component } from 'react';
import {
Card, CardTitle, CardBody, CardHeader, CardFooter, Collapse,
Dropdown, DropdownItem, DropdownMenu, DropdownToggle, InputGroup,
Form, Input, Button, Row, Col, Label, ButtonGroup
} from 'reactstrap';
import { connect } from 'react-redux';
// import { Control, Form, Errors, actions } from 'react-redux-form';
import { withRouter } from "react-router-dom";
class QuestionHeaderModalForm extends Component {
constructor(props) {
super(props);
this.onSubmit = this.onSubmit.bind(this);
this.onCancel = this.onCancel.bind(this);
this.state = {
rsDropDownOpen:false,
item: {
name:"",
description:"",
isvendor:false,
isinternal:false,
isreference:false
}
};
this.toggleRSDropDown = this.toggleRSDropDown.bind(this)
}
toggleRSDropDown() {
this.setState({rsDropDownOpen: !this.state.rsDropDownOpen})
}
onSubmit(values) {
console.log('values in onsubmit are:' + JSON.stringify(values.desc));
// this.props.onSubmitInitiative(values)
}
onDelete(values) {
// this.props.onDelete(values)
}
onCancel() {
// this.props.history.push('/initiatives');
console.log('oncancel called')
}
render() {
let deleteButton;
if (this.props.initiative) {
deleteButton =
} else {
deleteButton =
}
const existingRSItems = this.props.reqSections.reqSections.map(function (rsItem, index) {
return (
{rsItem.name}
);
});
return (
Question header:
this.onSubmit(values)}>
Select Reqruirement Section
Existing
{existingRSItems}
+Create new
Name
// defaultValue={this.props.item.description}
/>
Description
{' '}
{' '} Internal
{' '} Vendor
{' '} Reference
);
}
}
export default withRouter(connect()(QuestionHeaderModalForm));
import React, { Component } from 'react';
import {
Card, CardTitle, CardBody, CardHeader, CardFooter, Collapse,
Dropdown, DropdownItem, DropdownMenu, DropdownToggle, InputGroup,
Form, Input, Button, Row, Col, Label, ButtonGroup
} from 'reactstrap';
import { connect } from 'react-redux';
// import { Control, Form, Errors, actions } from 'react-redux-form';
import { withRouter } from "react-router-dom";
class QuestionHeaderModalForm extends Component {
constructor(props) {
super(props);
this.onSubmit = this.onSubmit.bind(this);
this.onCancel = this.onCancel.bind(this);
this.state = {
rsDropDownOpen:false,
item: {
name:"",
description:"",
isvendor:false,
isinternal:false,
isreference:false
}
};
this.toggleRSDropDown = this.toggleRSDropDown.bind(this)
}
toggleRSDropDown() {
this.setState({rsDropDownOpen: !this.state.rsDropDownOpen})
}
onSubmit(values) {
console.log('values in onsubmit are:' + JSON.stringify(values.desc));
// this.props.onSubmitInitiative(values)
}
onDelete(values) {
// this.props.onDelete(values)
}
onCancel() {
// this.props.history.push('/initiatives');
console.log('oncancel called')
}
render() {
let deleteButton;
if (this.props.initiative) {
deleteButton =
} else {
deleteButton =
}
const existingRSItems = this.props.reqSections.reqSections.map(function (rsItem, index) {
return (
{rsItem.name}
);
});
return (
Question header:
this.onSubmit(values)}>
Select Reqruirement Section
Existing
{existingRSItems}
+Create new
Name
// defaultValue={this.props.item.description}
/>
Description
{' '}
{' '} Internal
{' '} Vendor
{' '} Reference
);
}
}
export default withRouter(connect()(QuestionHeaderModalForm));