Skip to content

Commit 7270271

Browse files
authored
Merge pull request #101 from rcaferati/fix/onPress-flag
Fix onPress flag
2 parents a6da2bc + 13ce944 commit 7270271

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-really-awesome-button",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "React Native Button UI component that renders an 60fps animated set of progress enabled 3D performant buttons.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

src/Button.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ const AwesomeButton = ({
321321

322322
pressAnimation.current.start(() => {
323323
pressed.current = true;
324-
pressing.current = false;
325324

326325
onPressedIn && onPressedIn();
327326
});
@@ -495,7 +494,7 @@ const AwesomeButton = ({
495494
return;
496495
}
497496

498-
if (pressed.current === true || raiseLevel === 0) {
497+
if (pressing.current === true || raiseLevel === 0) {
499498
press();
500499

501500
if (progress === true) {

src/__tests__/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`AwesomeButton should render 1`] = `
55
accessible={true}
66
collapsable={false}
77
focusable={true}
8+
hitSlop={null}
89
onBlur={[Function]}
910
onClick={[Function]}
1011
onFocus={[Function]}
@@ -181,6 +182,7 @@ exports[`AwesomeButton should render a default text children 1`] = `
181182
accessible={true}
182183
collapsable={false}
183184
focusable={true}
185+
hitSlop={null}
184186
onBlur={[Function]}
185187
onClick={[Function]}
186188
onFocus={[Function]}

0 commit comments

Comments
 (0)