update jump control slider event
This commit is contained in:
parent
e4a862d142
commit
716ddba5ef
@ -7,6 +7,7 @@ const JumpControls = (props: any)=>{
|
|||||||
|
|
||||||
const onChange = useCallback(
|
const onChange = useCallback(
|
||||||
(value) => {
|
(value) => {
|
||||||
|
console.log(value, "hello")
|
||||||
if(value){
|
if(value){
|
||||||
const newCurrIndex = value -1
|
const newCurrIndex = value -1
|
||||||
if(newCurrIndex < src.length && newCurrIndex >=0){
|
if(newCurrIndex < src.length && newCurrIndex >=0){
|
||||||
@ -28,8 +29,8 @@ const JumpControls = (props: any)=>{
|
|||||||
<Slider
|
<Slider
|
||||||
min={1}
|
min={1}
|
||||||
max={src.length}
|
max={src.length}
|
||||||
onChange={onChange}
|
onAfterChange={onChange}
|
||||||
value={typeof inputValue === 'number' ? inputValue : 0}
|
defaultValue={typeof inputValue === 'number' ? inputValue : 0}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={4}>
|
<Col span={4}>
|
||||||
|
Loading…
Reference in New Issue
Block a user