Skip to content

Releases: UdaySravanK/RNSwipeButton

Handle the deprecated removeEventListener

13 Sep 05:48
a7a1aaa
Compare
Choose a tag to compare

New prop titleMaxFontScale

17 Jul 01:39
Compare
Choose a tag to compare

#68 Supporting large font size

  • Introduced a new prop "titleMaxFontScale" to support large font scaling

New prop thumbIconWidth

17 Jul 01:28
Compare
Choose a tag to compare
  • #58 Introduced new prop "thumbIconWidth" to adjust the width of thumb icon
  • #65 Corrected prop name in TS type definitions

Screen Shot 2021-07-16 at 20 27 33

New prop disableResetOnTap

17 Jul 01:26
Compare
Choose a tag to compare

Fixed git issue #49: Prevent returning to initial state

  • Adding a new prop called disableResetOnTap. After swipe success, tap on button resets it. This behavior can be disabled by setting this prop to true.

Use updated props in PanResponder callbacks

25 Dec 21:43
3aa6e77
Compare
Choose a tag to compare

Issue: Using useRef memoizes initial disable value. So the swipe functionality continues to work though the disabled prop is set as true.
Fix: Use useCallback instead of useRef to update PanResponder callbacks every time props update

Example:

const MyComponent = (props) => {
  const [disableSwipeButton, setDisableSwipeButton] = useState(false)
  return (
    <div>
      <RNSwipeButton disabled={disableSwipeButton} />
      <Button onPress={() => setDisableSwipeButton(!disableSwipeButton)} title="Toggle disable" />
    </div>
  )
}

railStyles defect fix

30 Sep 01:50
Compare
Choose a tag to compare

This release has

  • railStyles prop is not overriding thumb rail container styles. Due to which unable to match the rail styles with button container styles. With this release developer will get full control to style the thumb rail container.

Example code snippet:

<SwipeButton 
  containerStyles={{ borderRadius: 5 }}
  railStyles={{ borderRadius: 5 }}
/>

Right to left (RTL) layouts support

30 Sep 01:17
Compare
Choose a tag to compare

This release has

  • Fix for issue #38
  • enableRightToLeftSwipe prop has been renamed to enableReverseSwipe, so it makes sense for both LTR and RTL layouts.
  • Out of the box support for RTL layouts.
    If RTL is enabled at OS settings (by selecting languages like Arabic) then the rn-swipe-button works automatically as right to left swipe. To change it back to left to right swipe, prop enableReverseSwipe can be used.

v1.3.0

20 Aug 05:40
Compare
Choose a tag to compare

This release has

  • Fix for issue #23
  • Fix for issue #25
  • Introducing a new prop to reset the swipe by calling a reset function returned by 'forceReset' prop function
  • Issue: Setting prop shouldResetAfterSuccess=true is not completing the swipe fully, instead resetting it immediately. This is fixed now.

Supporting [email protected]

15 Aug 22:13
Compare
Choose a tag to compare

This release includes

  • Support for [email protected]
  • Converting class component to functional component using hooks
  • Improved panResponder

Below issue has been fixed

Types defs, new prop railStyles and code format

10 May 23:59
Compare
Choose a tag to compare
  • Adding type definitions for props
  • Adding new prop railStyles to customize thumb drag rail styles
  • Adding prop def in all places
  • Updated docs
  • Adding usage of railStyles in example app
  • Code format: Run yarn format to format all source code. Committing code through terminal will auto format code with prettier and adds to same commit using git pre-commit hook.