Skip to content

Commit

Permalink
hotfix: addComponentAsRefTo : Only a ReactOwner can have refs issue a…
Browse files Browse the repository at this point in the history
…nd updated version
  • Loading branch information
ni3galave committed Sep 28, 2017
1 parent 69e7bf1 commit 15e9b3e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions dist/editable.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions libs/js/Editable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ export default class Editable extends Component {
rootClose={true}
onHide={() => { this.setEditable(false) } }
show={editable}
target={() => ReactDOM.findDOMNode(this.refs.target)
}
target={() => ReactDOM.findDOMNode(this.editableAnchor)}
{...this.props}>
<Popover id={"popover-positioned-"+placement} title={title} key={this.props.name}>
{content}
Expand All @@ -214,7 +213,7 @@ export default class Editable extends Component {
return (
<div className={editableContainerClass} key={this.props.name} >
{ !(mode == 'inline' && editable)
? (<a ref={"target"}
? (<a ref={ref => this.editableAnchor = ref}
onClick={this.setEditable.bind(this, true)}
href="javascript:;"
>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-x-editable",
"version": "v0.0.7-beta",
"version": "v0.0.8-beta",
"description": "React X editable using react-bootstrap.",
"main": "dist/editable",
"repository": {
Expand Down

0 comments on commit 15e9b3e

Please sign in to comment.