update jump control slider event

This commit is contained in:
Vut Pov 2020-05-09 11:51:01 +07:00
parent e4a862d142
commit 716ddba5ef

View File

@ -7,6 +7,7 @@ const JumpControls = (props: any)=>{
const onChange = useCallback(
(value) => {
console.log(value, "hello")
if(value){
const newCurrIndex = value -1
if(newCurrIndex < src.length && newCurrIndex >=0){
@ -28,8 +29,8 @@ const JumpControls = (props: any)=>{
<Slider
min={1}
max={src.length}
onChange={onChange}
value={typeof inputValue === 'number' ? inputValue : 0}
onAfterChange={onChange}
defaultValue={typeof inputValue === 'number' ? inputValue : 0}
/>
</Col>
<Col span={4}>