We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, i try to pass close action into to popover body, but it cant work fo me. Where i get mistake?
togglePopover(toState) { const popoverIsOpen = typeof toState === 'boolean' ? toState : !this.state.popoverIsOpen; this.setState({ popoverIsOpen, }); } ... const popoverProps = { isOpen: this.state.popoverIsOpen, preferPlace: 'end', onOuterAction: e => { this.togglePopover(false); }, body: [ <div key="b" className={cx('popover-body')}> <div> <ChangeDayForm date={date} dayName={dayName} dayNum={dayNum} dayTypeId={dayTypeId} dayTypeName={dayTypeName} dayStart={dayStart} dayStop={dayStop} onCloseCard={e => this.togglePopover(false)} /> </div> </div>, ], }; class ChangeDayForm extends Component { constructor(props) { super(props); } render() { ... return ( .... <Button onClick={this.props.onCloseCard}>Отмена</Button> ); } }
The text was updated successfully, but these errors were encountered:
Same problem over here. Tried passing markup to body prop using string and array syntax but still cant register actions/events.
Sorry, something went wrong.
Create an external component, then render it inside the popoverProps.body.
popoverProps.body
const Test = () => ( <div key="b" onClick={() => console.log('works')}> Popover contents </div> ); .... const popoverProps = { ... body: <Test />, };
No branches or pull requests
Hi, i try to pass close action into to popover body, but it cant work fo me. Where i get mistake?
The text was updated successfully, but these errors were encountered: