2016-10-18 11 views
0

내 프로젝트에서 ReactBootstrapSlider 구성 요소를 사용하고 있습니다. 슬라이더의 currentValue를 얻고 싶습니다. 슬라이더가 멈 추면 값을 가져와이 값을 redux 저장소에 저장하려고합니다.ReactBootstrapSlider의 가치를 얻는 방법?

답변

0

<ReactBootstrapSlider 
    value={this.state.currentValue} 
    step={100} 
    change={this.changeValue} 
    slideStop={this.changeValue} 
    max={10000} 
    min={0} 
    orientation="horizontal" 
    reverse={true} 
/> 

그런 다음 당신은 단순히 아래의 기능을 구현하여 그 값을 얻을 수 있습니다처럼 슬라이더 구성 요소가 보이는 것으로 가정 할 수 있습니다.

changeValue(event){ 
    console.log("Current Value is " , event.target.value);} 

event.target.value는 당신에게 슬라이더의 값을 제공 할 것입니다.