Questions tagged [touchablewithoutfeedback]
32 questions
0
votes
1 answer
React-native Keyboard.dismiss dismisses the keyboard when using it
i am trying to use Keyboard.dismiss() inside of a TouchableWithoutFeedback element and for some reason, no matter where i place this TouchableWithoutFeedback element, the keyboard doesn't dismiss when tapping on areas outside the TextInput,
but it…

Cyber
- 11
- 4
0
votes
1 answer
TouchabeWithoutFeedback on Link
Im new to React Native. I use react native router. But the links items have this "highlight" when they are pressed.
This should be fixed using TouchableWithoutFeedback
I cant not get TouchableWithoutFeedback to work with Link items.
How can I make…

Nam
- 11
0
votes
1 answer
How to avoid onPress function works inside the inner Views in React-Native
I want to avoid the onPress={() => onRequestClose()} function working inside the inner View in my react-native project.
While user click on the screen the (whatever the area) onPress={() => onRequestClose()} works, to avoid that I use View inside…

Pasindu Weerakoon
- 588
- 1
- 11
- 39
0
votes
0 answers
Differences between Pressable and TouchableWithoutFeedback
Pressable and TouchableWithoutFeedback are higher order components to add touch functionality to their children. They have very similar use cases. I guess I can use Pressable anywhere in place of TouchableWithoutFeedback(due official docs…

SMhd Asadi
- 161
- 12
0
votes
1 answer
How can I focus on textinput when i click on TouchableWithoutFeedback?
I have a textinput. In this textinput, I have a letter "O" as an icon. I want textinput to be clickable when I press on "O" letter, how could i do that?
For now it doesn't work, since i couldnt add this property to that letter. I added how my…
user15974221
0
votes
0 answers
React native useRef Hook wouldn't store an array
Here's a simple code that doesn't work I really don't know why
const myArray = useRef(null) // or const myArray = useRef([]) or const myArray = useRef(new Array())
...Inside the functional component
{
…

achraf
- 1
0
votes
1 answer
React Native TouchableWithoutFeedback on view with position absolute
I have a modal that I want show when the user clicks a i button.
The modal envelops the entire screen, by setting the position to 'absolute'. This works fine, but when the user clicks somewhere on the screen, it should disappear again.
My…

GeekPeek
- 1,615
- 1
- 20
- 34
0
votes
1 answer
React Children only expected to receive a single react child when using with TouchableWithoutFeedback
In my application I have a text input, I want to hide the keyboard and lose focus whenever the user clicks anywhere on the screen or closes the keyboard.
I created this function for this:
interface DismissKeyBoardProps {
children?: ReactNode
}…

Keselme
- 3,779
- 7
- 36
- 68
0
votes
1 answer
React Native, TouchableOpacity alert get nothing
when i click on the button to open the toggle it works fine but when i want to click to display the alert i get nothing. any idea
…

Attachi Elyass
- 11
- 2
0
votes
0 answers
How to avoid TouchableWithoutFeedback decrease opacity when pressed
Basically, I have a React Native code with TouchableWithoutFeedback which blinks when I press. I have a TouchableWithoutFeedback wrapping an Image component. When I pressIn changes the state changing the Image's source. When I pressOut changes the…

Pablo Darde
- 5,844
- 10
- 37
- 55
0
votes
0 answers
React native Drag and drop animated.View onLongPress
I have circles I have to make these circles move in the space assigned to it and if the long pressure occurs on one of them, then it triggers an event.
I did this, but it doesn't seem to work very well.
I used Animated.View with…

Paul
- 3,644
- 9
- 47
- 113
0
votes
3 answers
Invariant Violation: Invariant Violation: React.Children.only expected to receive a single React element child
When I use TouchableOpacity my code works fine, but when I use TouchableWithoutFeedback my code throws an error. As I don't want that blurred effect on click, I want to use TouchableWithoutFeedback instead.
return (

Prajwal
- 95
- 10
0
votes
1 answer
React-Native Swipeout unable to swipe
Using the suggested example code found here https://github.com/dancormier/react-native-swipeout/blob/master/example/SwipeoutExample.js#L46
I am unable to swipe whenever I have TouchableWithoutFeedback enabled.
Here is my code:
return (
…

mKane
- 932
- 13
- 30
0
votes
1 answer
React Native: New screen after touching image using stack navigator
I am trying to learn React Native by creating an app. After I touch an image I want a new screen to be placed on top of the current screen.
I think I want to use a StackNavigator after onPress? I've read about them but don't know how to use them…

micro
- 11
- 1
- 4
0
votes
1 answer
TouchableWithoutFeedback never fires touch events
I have the following React-Native code which alerts the user that it was pressed, however it does not respond to anything.
I have tried using different Touchable components but none seem to work, the only one is Button but that's not really what I…

J-Cake
- 1,526
- 1
- 15
- 35