Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
remove deleted refs keys from childRefs registry
Browse files Browse the repository at this point in the history
  • Loading branch information
gbiryukov authored and gcanti committed Dec 8, 2017
1 parent 6f86e26 commit a5ab348
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,17 @@ export class Datetime extends Component {
}

class ComponentWithChildRefs extends Component {

childRefs = {};

setChildRefFor = prop => ref => {
this.childRefs[prop] = ref
if (ref) {
this.childRefs[prop] = ref
} else {
delete this.childRefs[prop]
}
}

}

@decorators.templates
Expand Down

0 comments on commit a5ab348

Please sign in to comment.