Skip to content
This repository was archived by the owner on May 15, 2022. It is now read-only.

Commit 9958b13

Browse files
Removed onBlur event handler from DatNumber
1 parent 1d2f6e4 commit 9958b13

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

build/react-dat-gui.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6874,6 +6874,12 @@ var DatNumber = function (_Component) {
68746874

68756875
return value.toFixed(decimalPlaces);
68766876
}
6877+
6878+
/**
6879+
* @deprecated This has been deprecated for now and is no longer applied to the
6880+
* component onBlur.
6881+
*/
6882+
68776883
}, {
68786884
key: 'update',
68796885
value: function update() {
@@ -6939,8 +6945,7 @@ var DatNumber = function (_Component) {
69396945
value: this.state.value,
69406946
style: { width: inputWidth + '%' },
69416947
onChange: this.handleChange,
6942-
onFocus: this.handleFocus,
6943-
onBlur: this.handleBlur
6948+
onFocus: this.handleFocus
69446949
})
69456950
)
69466951
);

build/react-dat-gui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/src/react-dat-gui/components/DatNumber.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export default class DatNumber extends Component {
7272
document.addEventListener('keydown', this.handleKeyDown);
7373
}
7474

75+
/**
76+
* @deprecated This has been deprecated for now and is no longer applied to the
77+
* component onBlur.
78+
*/
7579
handleBlur = event => {
7680
const value = this.applyConstraints(event.target.value);
7781

@@ -147,7 +151,6 @@ export default class DatNumber extends Component {
147151
style={{ width: `${inputWidth}%` }}
148152
onChange={this.handleChange}
149153
onFocus={this.handleFocus}
150-
onBlur={this.handleBlur}
151154
/>
152155
</label>
153156
</li>

src/components/DatNumber.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export default class DatNumber extends Component {
7272
document.addEventListener('keydown', this.handleKeyDown);
7373
}
7474

75+
/**
76+
* @deprecated This has been deprecated for now and is no longer applied to the
77+
* component onBlur.
78+
*/
7579
handleBlur = event => {
7680
const value = this.applyConstraints(event.target.value);
7781

@@ -147,7 +151,6 @@ export default class DatNumber extends Component {
147151
style={{ width: `${inputWidth}%` }}
148152
onChange={this.handleChange}
149153
onFocus={this.handleFocus}
150-
onBlur={this.handleBlur}
151154
/>
152155
</label>
153156
</li>

0 commit comments

Comments
 (0)