Skip to content

Commit 2503e16

Browse files
authored
Fix/change haptic feedback (#163)
* fix: set hapticFeedback default to false * docs(changeset): change hapticFeedbackEnabled to false by default
1 parent af0c62a commit 2503e16

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

.changeset/honest-grapes-sparkle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-native-bottom-tabs': patch
3+
---
4+
5+
change hapticFeedbackEnabled to false by default

docs/docs/docs/guides/standalone-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Whether to disable animations between tabs.
131131

132132
Whether to enable haptic feedback on tab press.
133133
- Type: `boolean`
134-
- Default: `true`
134+
- Default: `false`
135135

136136

137137
#### `tabLabelStyle`

docs/docs/docs/guides/usage-with-react-navigation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Tab views using the sidebar adaptable style have an appearance
152152

153153
#### `hapticFeedbackEnabled`
154154

155-
Whether to enable haptic feedback on tab press. Defaults to true.
155+
Whether to enable haptic feedback on tab press. Defaults to false.
156156

157157
#### `tabLabelStyle`
158158

packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context
4141
private var inactiveTintColor: Int? = null
4242
private val checkedStateSet = intArrayOf(android.R.attr.state_checked)
4343
private val uncheckedStateSet = intArrayOf(-android.R.attr.state_checked)
44-
private var hapticFeedbackEnabled = true
44+
private var hapticFeedbackEnabled = false
4545
private var fontSize: Int? = null
4646
private var fontFamily: String? = null
4747
private var fontWeight: Int? = null

packages/react-native-bottom-tabs/ios/TabViewImpl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TabViewProps: ObservableObject {
2121
@Published var translucent: Bool = true
2222
@Published var ignoresTopSafeArea: Bool = true
2323
@Published var disablePageAnimations: Bool = false
24-
@Published var hapticFeedbackEnabled: Bool = true
24+
@Published var hapticFeedbackEnabled: Bool = false
2525
@Published var fontSize: Int?
2626
@Published var fontFamily: String?
2727
@Published var fontWeight: String?

packages/react-native-bottom-tabs/ios/TabViewProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ import SDWebImageSVGCoder
9292
}
9393
}
9494

95-
@objc public var hapticFeedbackEnabled: Bool = true {
95+
@objc public var hapticFeedbackEnabled: Bool = false {
9696
didSet {
9797
props.hapticFeedbackEnabled = hapticFeedbackEnabled
9898
}

packages/react-native-bottom-tabs/src/TabView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const TabView = <Route extends BaseRoute>({
164164
barTintColor,
165165
getHidden = ({ route }: { route: Route }) => route.hidden,
166166
getActiveTintColor = ({ route }: { route: Route }) => route.activeTintColor,
167-
hapticFeedbackEnabled = true,
167+
hapticFeedbackEnabled = false,
168168
tabLabelStyle,
169169
...props
170170
}: Props<Route>) => {

0 commit comments

Comments
 (0)