Description
In iOS, after setting the inputAccessoryViewID for TextInput, you can listen to keyboardDidShow. Every time a value is entered, keyboardDidShow will be triggered
Steps to reproduce
useEffect(() => {
const showSubscription = Keyboard.addListener('keyboardDidShow', () => {
xxRef.current++;
setShowNum(xxRef.current);
setKeyboardStatus('Keyboard Shown');
});
const hideSubscription = Keyboard.addListener('keyboardDidHide', () => {
setKeyboardStatus('Keyboard Hidden');
});
return () => {
showSubscription.remove();
hideSubscription.remove();
};
}, []);
<TextInput
placeholder="Click here…"
inputAccessoryViewID="inputAccessory2"
style={style.input}
value={input2}
onChangeText={value => {
setInput2(value);
}}
/>
React Native Version
0.82.1
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
System:
OS: macOS 15.6.1
CPU: (8) arm64 Apple M1 Pro
Memory: 129.45 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.11.1
path: /Users/jackie/.nvm/versions/node/v20.11.1/bin/node
Yarn:
version: 1.22.21
path: /Users/jackie/.nvm/versions/node/v20.11.1/bin/yarn
npm:
version: 10.2.4
path: /Users/jackie/.nvm/versions/node/v20.11.1/bin/npm
Watchman:
version: 2025.08.11.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.4
- iOS 18.4
- macOS 15.4
- tvOS 18.4
- visionOS 2.4
- watchOS 11.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.3 AI-233.14808.21.2331.11842104
Xcode:
version: 16.3/16E140
path: /usr/bin/xcodebuild
Languages:
Java:
version: 24.0.2
path: /usr/bin/javac
Ruby:
version: 3.2.2
path: /Users/jackie/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.77.1
wanted: 0.77.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
MANDATORY Reproducer
https://snack.expo.dev/@jackie_tang/blessed-yellow-ramen
Screenshots and Videos
No response
Description
In iOS, after setting the inputAccessoryViewID for TextInput, you can listen to keyboardDidShow. Every time a value is entered, keyboardDidShow will be triggered
Steps to reproduce
useEffect(() => {
const showSubscription = Keyboard.addListener('keyboardDidShow', () => {
xxRef.current++;
setShowNum(xxRef.current);
setKeyboardStatus('Keyboard Shown');
});
const hideSubscription = Keyboard.addListener('keyboardDidHide', () => {
setKeyboardStatus('Keyboard Hidden');
});
return () => {
showSubscription.remove();
hideSubscription.remove();
};
}, []);
<TextInput
placeholder="Click here…"
inputAccessoryViewID="inputAccessory2"
style={style.input}
value={input2}
onChangeText={value => {
setInput2(value);
}}
/>
React Native Version
0.82.1
Affected Platforms
Runtime - iOS
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://snack.expo.dev/@jackie_tang/blessed-yellow-ramen
Screenshots and Videos
No response