Skip to content

Releases: troberts-28/react-native-timer-picker

Release v2.1.0

20 Feb 10:53
Compare
Choose a tag to compare

✨ Features

  • Made it possible to have the TimerPicker component fade-out on a transparent background. The standard implementation relies on the component having a solid background, which meant you couldn't have a fade-out if rendering it on top of a gradient/image. This feature requires the MaskedView component to be supplied to the picker (see latest docs).

⚠️ Changes

  • Two props have been disabled (topPickerGradientOverlayProps and bottomPickerGradientOverlayProps). These have been consolidated into pickerGradientOverlayProps as the picker now renders a single LinearGradient that handles both the gradient at the top and bottom. To change the position of the gradient, supply your own locations array to pickerGradientOverlayProps.

⚙️ Dev Setup Modifications

  • Updated the projcet to Yarn v4.6.0.

Release v2.0.3

10 Feb 15:48
cb95c1d
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Made a further attempt to fix an iOS snapping issue by making the DurationScroll inner FlatList width larger than the container. Works in all scenarios tested so far but not guaranteed to completely solve the issue (#44 and #46).
  • Added note to README about Tamagui bottom sheet component incompatibility (#45).

Release v2.0.2

16 Dec 10:08
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Fixed an Android-specific issue that caused one or more of the pickers not initially rendering (until scrolled) inside TimerPickerModal (#43). This was a further manifestation of the slight change in RN's FlatList between v0.74 and v0.76 (the first part of which was fixed in v2.0.1).

✨ Features

  • Exposed three additional custom style props for additional styling flexibility (durationScrollFlatList, durationScrollFlatListContainer, durationScrollFlatListContentContainer)

Release v2.0.1

03 Dec 11:39
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Fixed an issue that saw one of the pickers not always snapping to values inside TimerPickerModal. This was caused by a slight change in RN's FlatList between v0.74 and v0.76. The previous default styling led to the FlatList not always being able to accurately calculate its layout, which stopped the snapToOffsets prop working. The default styling has been altered and safeguards put in place to avoid people introducing the same issue with the customStyles prop.
  • Safeguarded against NaN inputs to initial values (and other variables). This previously caused a crash.

Release v2.0.0

18 Nov 13:30
Compare
Choose a tag to compare

⚠️ Breaking Changes

  • Increased package peer dependency versions of React Native and React to >=v0.72.0 and >=18.2.0, respectively, to reflect an incompatibility with prior React Native versions (#32)

✨ Features

  • Tested and working on the new architecture in both Expo and bare React Native projects (#37)
  • Introduced maximumHours, maximumMinutes and maximumSeconds props to adjust the maximum possible value in each picker (#42) @makowskimichal
  • Added hourInterval, minuteInterval and secondInterval props to adjust the interval between values in each picker (#39) @OmerToledo
  • Made it possible to use any type of audio/haptic library for picker feedback (previously only expo-av and expo-haptics were supported) with the generic feedback callback pickerFeedback (#41) @danielreuterwall

⚙️ Dev Setup Modifications

  • Migrated the project to Yarn v3.6.4 and configured the two examples as workspaces within the outer project.

Thanks @makowskimichal, @OmerToledo and @danielreuterwall for your contributions 👏👏👏

Release v1.10.3

04 Aug 12:31
Compare
Choose a tag to compare
  • Fix various initial scroll position issues introduced by the repeatNumbersNTimes prop #35
  • Put in various safeguards to ensure that the padWithNItems and repeatNumbersNTimes props cannot be set to values that break the picker.
  • Change default repeatHourNumbersNTimes to 7 for better consistency with minutes/seconds pickers.
  • Attempted to safeguard against reported error: "this.props" should not be accessed during state updates #32

Release v1.10.2

30 Jul 10:28
Compare
Choose a tag to compare
  • The DurationScroll component repeats the list of numbers a given number of times to avoid auto-scrolling every time you hit the end of the list. Previously, this was hard-coded as 3 repetitions. Have now added props to configure the number of repititions for each picker: repeatHourNumbersNTimes, repeatMinuteNumbersNTimes and repeatSecondNumbersNTimes. Note that these have a performance trade-off: higher values mean the picker has to auto-scroll less to maintain the infinite scroll, but has to render a longer list of numbers. By default, the props are set to 6, 3 and 3, respectively, which balances that trade-off effectively. #33 #34
  • Improved the auto-scroll behaviour to avoid jumping to the next number whens scrolling slowly. #33
  • Modified the initial scroll index behaviour to ensure it starts on zero in the case where infinite scroll is disabled and the picker is set to one repetition. #34

Release v1.10.1

13 Jul 19:38
Compare
Choose a tag to compare
  • Fix entrypoint issue caused by removing src folder from bundle.

Release v1.10.0

13 Jul 19:37
Compare
Choose a tag to compare
  • Add props to configure whether to pad single-digit hours/minutes/seconds in the picker with a zero: padHoursWithZero, padMinutesWithZero, padSecondsWithZero #31
  • Remove src folder from npm bundle to reduce package size. Please note that there was an initial with the way this was done, please use v1.10.1 instead of this version.

Release v1.9.1

01 Jul 14:44
Compare
Choose a tag to compare