Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix non-working loop when lowerLimit equals 0 #78

Merged
merged 2 commits into from
Oct 1, 2022

Conversation

yutro
Copy link
Contributor

@yutro yutro commented Mar 7, 2022

Summary

Problem

Loop stuck on upperLimit when loop:true and lowerLimit presented but equals 0, expected behavior that it will go to lower limit when it's presented.
I believe it's a bug 🤔

  • Loop stuck on upperLimit when loop:true but no lower limit presented
    I think it would be nice if we could extend it to go to start (initial ) value if loop:true but lower limit not presented

you can test those cases here (wanted to record some gifs but something wrong with my gif recorder 😞 )
https://codesandbox.io/s/suspicious-bohr-m90pp7?file=/src/App.tsx

Solution

what was done in this PR:

  • fix non-working loop when lowerLimit equals 0
  • when loop:true and lowerLimit not presented, loop goes to start (initial) value after reaching upperLimit value

let me know WDYT about it 😄

P.S I'm a big fan of this library and always wanted to made something for it 😄 looks like it's my chance 😄

…ial value when loop:true and lowerLimit not presented
@yutro yutro changed the title fix non-working loop when lowerLimit equals 0 + fallback loop to init… fix non-working loop when lowerLimit equals 0 Mar 7, 2022
@RIP21 RIP21 merged commit 1d5eeec into kitze:master Oct 1, 2022
@RIP21
Copy link
Collaborator

RIP21 commented Oct 2, 2022

published in 2.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants