Skip to content

Commit c400350

Browse files
committed
more findDOMNode
1 parent 4a6265c commit c400350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DateTimeField.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ export default class DateTimeField extends Component {
274274
};
275275
offset.top = offset.top + findDOMNode(this.refs.datetimepicker).offsetHeight;
276276
scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
277-
placePosition = this.props.direction === "up" ? "top" : this.props.direction === "bottom" ? "bottom" : this.props.direction === "auto" ? offset.top + this.refs.widget.getDOMNode().offsetHeight > window.offsetHeight + scrollTop && this.refs.widget.offsetHeight + this.refs.datetimepicker.getDOMNode().offsetHeight > offset.top ? "top" : "bottom" : void 0;
277+
placePosition = this.props.direction === "up" ? "top" : this.props.direction === "bottom" ? "bottom" : this.props.direction === "auto" ? offset.top + findDOMNode(this.refs.widget).offsetHeight > window.offsetHeight + scrollTop && this.refs.widget.offsetHeight + findDOMNode(this.refs.datetimepicker).offsetHeight > offset.top ? "top" : "bottom" : void 0;
278278
if (placePosition === "top") {
279-
offset.top = -this.refs.widget.getDOMNode().offsetHeight - this.getDOMNode().clientHeight - 2;
279+
offset.top = -findDOMNode(this.refs.widget).offsetHeight - findDOMNode(this).clientHeight - 2;
280280
classes.top = true;
281281
classes.bottom = false;
282282
classes["pull-right"] = true;

0 commit comments

Comments
 (0)