Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard handling does not work in edgeToEdge mode #111

Open
3 tasks done
teivienn opened this issue Jan 12, 2025 · 1 comment
Open
3 tasks done

Keyboard handling does not work in edgeToEdge mode #111

teivienn opened this issue Jan 12, 2025 · 1 comment

Comments

@teivienn
Copy link

When using edge to edge mode TrueSheet does not handle the keyboard state in any way

I also tried using the react-native-keyboard-controller add-on library for keyboard handling but it doesn't work inside TrueSheet

env

  • new arch
  • expo 52
  • react native 0.76.6

Example to reproduce

import { Button, View, Text, TextInput } from 'react-native';

import { TrueSheet } from '@lodev09/react-native-true-sheet';
import { useRef } from 'react';

export default function App() {
  const sheet = useRef<TrueSheet>(null);

  return (
    <View
      style={{
        paddingTop: 100,
        paddingHorizontal: 20,
        backgroundColor: 'white',
        flex: 1,
      }}
    >
      <Button title="Open Sheet" onPress={() => sheet.current?.present()} />

      <TrueSheet ref={sheet} cornerRadius={25} edgeToEdge>
        <View style={{ height: 100, backgroundColor: 'white', padding: 20 }}>
          <Text>Input</Text>
          <TextInput
            placeholder="placeholder"
            style={{ borderWidth: 1, height: 50 }}
          />
        </View>
      </TrueSheet>
    </View>
  );
}

screenshots

disabled enabled
@teivienn
Copy link
Author

I think we should use imePadding for such cases. I unfortunately don't understand how to use it outside of “android compose”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant