Skip to content

Commit ee1c27c

Browse files
Rewrite Numeric input to use new multivalued subsystem
1 parent a6f14c5 commit ee1c27c

File tree

6 files changed

+136
-274
lines changed

6 files changed

+136
-274
lines changed

src/components/fields/Numeric.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ import Field from './Field';
22
import NumericInput from '../widgets/NumericInputStatefulWrapper';
33
import PropTypes from 'prop-types';
44
import React, {Component} from 'react';
5-
import {bem, connectToContainer} from '../../lib';
5+
import {connectToContainer} from '../../lib';
66

77
class Numeric extends Component {
88
render() {
99
return (
1010
<Field {...this.props}>
1111
<NumericInput
1212
value={this.props.fullValue()}
13+
defaultValue={this.props.defaultValue}
1314
step={this.props.step}
1415
min={this.props.min}
1516
max={this.props.max}
1617
onChange={this.props.updatePlot}
1718
onUpdate={this.props.updatePlot}
19+
multiValued={this.props.multiValued}
1820
showArrows
1921
/>
2022
</Field>
@@ -23,11 +25,13 @@ class Numeric extends Component {
2325
}
2426

2527
Numeric.propTypes = {
28+
defaultValue: PropTypes.number,
2629
fullValue: PropTypes.func,
2730
min: PropTypes.number,
2831
max: PropTypes.number,
2932
step: PropTypes.number,
3033
updatePlot: PropTypes.func,
34+
multiValued: PropTypes.bool,
3135
...Field.propTypes,
3236
};
3337

src/components/widgets/NumericInput.js

Lines changed: 0 additions & 114 deletions
This file was deleted.

0 commit comments

Comments
 (0)