davidchin/react-input-range

Failed prop type: The prop `children` is marked as required in `Label`, but its value is `undefined`

tirdadc opened this issue · 0 comments

warning.js?8a56:36 Warning: Failed prop type: The prop `children` is marked as required in `Label`, but its value is `undefined`.
    in Label (created by Slider)
    in Slider (created by InputRange)
    in div (created by Track)
    in Track (created by InputRange)
    in div (created by InputRange)
    in InputRange (created by SliderField)
    in div (created by SliderField)

Here is my component instantiation:

<InputRange
  step={this.props.step ? this.props.step : 10}
  minValue={this.props.min}
  maxValue={this.props.max}
  value={[this.props.lower, this.props.upper]}
  onChange={this.onChange} />

Not sure why this is not working? I don't see anything in the docs about children.

EDIT: I needed to properly set the value with this:

value={{min: this.props.lower, max: this.props.upper}}

Now I have a separate issue where the CSS is not being loaded in a Webpacker setting.