Skip to content

Commit c8cacf4

Browse files
committed
Remove calls to getDOMNode (deprecated in 0.14.x)
1 parent b2e9a60 commit c8cacf4

File tree

12 files changed

+23
-23
lines changed

12 files changed

+23
-23
lines changed

src/sentry/static/sentry/app/components/assigneeSelector.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ var AssigneeSelector = React.createClass({
8787
},
8888

8989
onDropdownOpen() {
90-
this.refs.filter.getDOMNode().focus();
90+
React.findDOMNode(this.refs.filter).focus();
9191
},
9292

9393
onDropdownClose() {
@@ -118,7 +118,7 @@ var AssigneeSelector = React.createClass({
118118

119119
componentDidUpdate(prevProps, prevState) {
120120
// XXX(dcramer): fix odd dedraw issue as of Chrome 45.0.2454.15 dev (64-bit)
121-
var node = jQuery(this.refs.container.getDOMNode());
121+
var node = jQuery(React.findDOMNode(this.refs.container));
122122
node.hide().show(0);
123123
},
124124

src/sentry/static/sentry/app/components/autoSelectText.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import React from "react";
33

44
const AutoSelectText = React.createClass({
55
componentDidMount() {
6-
let ref = this.refs.element.getDOMNode();
6+
let ref = React.findDOMNode(this.refs.element);
77
jQuery(ref).bind('click', this.selectText);
88
},
99

1010
componentWillUnmount() {
11-
let ref = this.refs.element.getDOMNode();
11+
let ref = React.findDOMNode(this.refs.element);
1212
jQuery(ref).unbind('click', this.selectText);
1313
},
1414

1515
selectText() {
16-
var node = this.refs.element.getDOMNode().firstChild;
16+
var node = React.findDOMNode(this.refs.element).firstChild;
1717
if (document.selection) {
1818
let range = document.body.createTextRange();
1919
range.moveToElementText(node);

src/sentry/static/sentry/app/components/clippedBox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var ClippedBox = React.createClass({
2020
},
2121

2222
componentDidMount() {
23-
var renderedHeight = this.getDOMNode().offsetHeight;
23+
var renderedHeight = React.findDOMNode(this).offsetHeight;
2424

2525
if (renderedHeight > this.props.clipHeight ) {
2626
/*eslint react/no-did-mount-set-state:0*/

src/sentry/static/sentry/app/components/dropdownLink.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ var DropdownLink = React.createClass({
2121
},
2222

2323
isOpen() {
24-
return this.getDOMNode().classList.contains("open");
24+
return React.findDOMNode(this).classList.contains("open");
2525
},
2626

2727
close() {
28-
this.getDOMNode().classList.remove("open");
28+
React.findDOMNode(this).classList.remove("open");
2929
},
3030

3131
onToggle(e) {

src/sentry/static/sentry/app/components/flotChart.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ var FlotChart = React.createClass({
113113
lines: { show: false }
114114
};
115115

116-
var chart = this.refs.chartNode.getDOMNode();
116+
var chart = React.findDOMNode(this.refs.chartNode);
117117
jQuery.plot(chart, series, plotOptions);
118118
},
119119

src/sentry/static/sentry/app/components/projectHeader/projectSelector.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ var ProjectSelector = React.createClass({
132132
},
133133

134134
onOpen(evt) {
135-
this.refs.filter.getDOMNode().focus();
135+
React.findDOMNode(this.refs.filter).focus();
136136
},
137137

138138
onClose() {
@@ -143,7 +143,7 @@ var ProjectSelector = React.createClass({
143143

144144
componentDidUpdate(prevProps, prevState) {
145145
// XXX(dcramer): fix odd dedraw issue as of Chrome 45.0.2454.15 dev (64-bit)
146-
var node = jQuery(this.refs.container.getDOMNode());
146+
var node = jQuery(React.findDOMNode(this.refs.container));
147147
node.hide().show(0);
148148
},
149149

src/sentry/static/sentry/app/components/searchBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var SearchBar = React.createClass({
2424
},
2525

2626
blur() {
27-
this.refs.searchInput.getDOMNode().blur();
27+
React.findDOMNode(this.refs.searchInput).blur();
2828
},
2929

3030
onSubmit(evt) {

src/sentry/static/sentry/app/views/ruleEditor/index.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ var RuleEditor = React.createClass({
3131

3232
componentDidUpdate() {
3333
if (this.state.error) {
34-
$(document.body).scrollTop($(this.refs.form.getDOMNode()).offset().top);
34+
$(document.body).scrollTop($(React.findDOMNode(this.refs.form)).offset().top);
3535
}
3636
},
3737

3838
onSubmit(e) {
3939
e.preventDefault();
40-
var form = $(this.refs.form.getDOMNode());
40+
var form = $(React.findDOMNode(this.refs.form));
4141
var conditions = [];
4242
form.find('.rule-condition-list .rule-form').each((_, el) => {
4343
conditions.push(this.serializeNode(el));
@@ -46,8 +46,8 @@ var RuleEditor = React.createClass({
4646
form.find('.rule-action-list .rule-form').each((_, el) => {
4747
actions.push(this.serializeNode(el));
4848
});
49-
var actionMatch = $(this.refs.actionMatch.getDOMNode()).val();
50-
var name = $(this.refs.name.getDOMNode()).val();
49+
var actionMatch = $(React.findDOMNode(this.refs.actionMatch)).val();
50+
var name = $(React.findDOMNode(this.refs.name)).val();
5151
var data = {
5252
actionMatch: actionMatch,
5353
actions: actions,

src/sentry/static/sentry/app/views/ruleEditor/ruleNode.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var RuleNode = React.createClass({
1010
},
1111

1212
componentDidMount() {
13-
let $html = $(this.refs.html.getDOMNode());
13+
let $html = $(React.findDOMNode(this.refs.html));
1414

1515
$html.find('select, input, textarea').each((_, el) => {
1616
let $el = $(el);

src/sentry/static/sentry/app/views/stream/searchBar.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ var SearchBar = React.createClass({
109109
},
110110

111111
blur() {
112-
this.refs.searchInput.getDOMNode().blur();
112+
React.findDOMNode(this.refs.searchInput).blur();
113113
},
114114

115115
onSubmit(evt) {
@@ -155,7 +155,7 @@ var SearchBar = React.createClass({
155155
},
156156

157157
getCursorPosition() {
158-
return this.refs.searchInput.getDOMNode().selectionStart;
158+
return React.findDOMNode(this.refs.searchInput).selectionStart;
159159
},
160160

161161
/**
@@ -217,7 +217,7 @@ var SearchBar = React.createClass({
217217
this.setState(
218218
{ query: this.state.query + ' ' },
219219
() => {
220-
this.refs.searchInput.getDOMNode().setSelectionRange(cursor + 1, cursor + 1);
220+
React.findDOMNode(this.refs.searchInput).setSelectionRange(cursor + 1, cursor + 1);
221221
this.updateAutoCompleteItems();
222222
}
223223
);
@@ -376,7 +376,7 @@ var SearchBar = React.createClass({
376376
query: newQuery
377377
}, () => {
378378
// setting a new input value will lose focus; restore it
379-
var node = this.refs.searchInput.getDOMNode();
379+
var node = React.findDOMNode(this.refs.searchInput);
380380
node.focus();
381381

382382
// then update the autocomplete box with new contextTypes

0 commit comments

Comments
 (0)