-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
Hello, in this code in renderOverlay
function:
<Modal title="Modal Title" onRequestHide={this.handleToggle}>
<div className="modal-body">
<Input
type="text"
defaultValue={this.props.defaultValue}
ref="input" />
</div>
<div className="modal-footer">
<Button onClick={this.handleToggle}>Close</Button>
<Button bsStyle="primary" onClick={this.saveChange}>Save change</Button>
</div>
</Modal>
i get following error:
Uncaught Error: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `re...<omitted>...f.
Is there any solution, how to ref input in modal body?
Metadata
Metadata
Assignees
Labels
No labels