react-native-timer-picker icon indicating copy to clipboard operation
react-native-timer-picker copied to clipboard

Question: option to change the deltas between the values?

Open oferRounds opened this issue 1 year ago • 4 comments

For example, make the minutes jump in 15. i.e., 0, 15, 30, 45...

Thank you for this great library!

oferRounds avatar Sep 11 '24 14:09 oferRounds

Hey @oferRounds 👋

Great suggestion! Shouldn't be difficult to make this possible.

I don't have any capacity to work on this until October, but would happily review a PR if you felt like having a go?

troberts-28 avatar Sep 11 '24 15:09 troberts-28

Cool, sounds good! and thank you for your fast reply. We will try to look into it, and ping you if any questions pop up We‘ll keep you posted Thank you!

cc: @omerToledo

oferRounds avatar Sep 11 '24 15:09 oferRounds

hi @troberts-28 any suggestion how to implement it ? when i try to reach the logic in the node_modules lib i see only dist files and not the actual ts file so its kinda hard to actually test changes and debug it wdyt ?

OmerToledo avatar Sep 15 '24 12:09 OmerToledo

Hey @OmerToledo!

Ah yeah the ts files aren't bundled into the npm package to keep it as lean as possible.

Follow the README instructions to get a dev version of it set up. It's easiest to use Expo Go on a real device.

You'll want to start by looking at src/components/DurationScroll, in particular the generateNumbers helper function.

Give me a shout if you have any trouble!

troberts-28 avatar Sep 15 '24 16:09 troberts-28

Hey all, this feature has just been released in v2.0.0 (see the hourInterval, minuteInterval and secondInterval props).

Thanks again @OmerToledo for the work you did on this 🙌

troberts-28 avatar Nov 18 '24 13:11 troberts-28