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

Commit e49a9fc

Browse files
Support min and max in DatNumber input
1 parent 4eb7cee commit e49a9fc

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

build/react-dat-gui.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6932,6 +6932,8 @@ var DatNumber = function (_Component) {
69326932
_react2.default.createElement('input', {
69336933
type: 'number',
69346934
step: step,
6935+
min: min,
6936+
max: max,
69356937
inputMode: 'numeric',
69366938
value: this.state.value,
69376939
style: { width: inputWidth + '%' },

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ export default class DatNumber extends Component {
139139
<input
140140
type="number"
141141
step={step}
142+
min={min}
143+
max={max}
142144
inputMode="numeric"
143145
value={this.state.value}
144146
style={{ width: `${inputWidth}%` }}

src/components/DatNumber.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ export default class DatNumber extends Component {
139139
<input
140140
type="number"
141141
step={step}
142+
min={min}
143+
max={max}
142144
inputMode="numeric"
143145
value={this.state.value}
144146
style={{ width: `${inputWidth}%` }}

0 commit comments

Comments
 (0)