You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**When I come on the login screen without pressing on the input field goBack is working but when I press the input field then after coming to back screen freezes **
issue is coming in android TV
`import styled from '@emotion/native';
import { SpatialNavigationNode,DefaultFocus } from 'react-tv-space-navigation';
import { TextInput as RNTextInput } from 'react-native';
import { useRef ,useEffect} from 'react';
import { Typography } from './Typography';
import { Box } from './Box';
import { Spacer } from './Spacer';
import React from 'react';
/**
It works, but it's not perfect.
If you press the back button on Android to dismiss the keyboard,
focus is in a weird state where we keep listening to remote control arrow movements.
Ideally, we'd like to always remove the native focus when the keyboard is dismissed.
*/
export const TextInputs = ({ label,onChange,value,error,readOnly }: { label: string,onChange:any,onBlur:any,value:any ,error:any,readOnly:any}) => {
const ref = useRef(null);
useEffect(() => {
return () => {
ref.current?.blur(); // Clear focus when component unmounts
};
}, []);
return (
Hey, I am having a very hard time understanding your issue. The code is not formatted properly, and it looks like you're mixing native components (not supported by the lib) with custom components for the lib 🤔
**When I come on the login screen without pressing on the input field goBack is working but when I press the input field then after coming to back screen freezes **
issue is coming in android TV
`import styled from '@emotion/native';
import { SpatialNavigationNode,DefaultFocus } from 'react-tv-space-navigation';
import { TextInput as RNTextInput } from 'react-native';
import { useRef ,useEffect} from 'react';
import { Typography } from './Typography';
import { Box } from './Box';
import { Spacer } from './Spacer';
import React from 'react';
/**
It works, but it's not perfect.
If you press the back button on Android to dismiss the keyboard,
focus is in a weird state where we keep listening to remote control arrow movements.
Ideally, we'd like to always remove the native focus when the keyboard is dismissed.
*/
export const TextInputs = ({ label,onChange,value,error,readOnly }: { label: string,onChange:any,onBlur:any,value:any ,error:any,readOnly:any}) => {
const ref = useRef(null);
useEffect(() => {
return () => {
ref.current?.blur(); // Clear focus when component unmounts
};
}, []);
return (
{label}
<SpatialNavigationNode
isFocusable={readOnly?false: true}
onSelect={() => {
readOnly? null : setTimeout(() => {
ref?.current?.focus();
}, 500);
);
};
const StyledTextInput = styled(RNTextInput)<{ isFocused: boolean,error:any,readOnly:boolean }>(({ isFocused, theme ,error,readOnly}) => ({
borderColor: isFocused ? 'white' : error ? 'red' :'black',
borderWidth: 2,
borderRadius: 8,
color:readOnly? 'gray' : 'white',
backgroundColor: theme.colors.background.inputBG,
paddingHorizontal:8
}));
`
I have tried to remove the onSelect code and isFocusable condition but the issue is still present
Please help
The text was updated successfully, but these errors were encountered: