lodev09 / react-native-true-sheet

The true native bottom sheet experience 💩
https://sheet.lodev09.com
MIT License
394 stars 12 forks source link

[Bug][Android] Bottom Sheet is Unable to Fully Expand After Opening and Closing TextInput #41

Closed keith-badulis closed 2 months ago

keith-badulis commented 2 months ago

Hello! I'm liking the performance of your bottom sheet so far (coming from Gorhom's, which has been sluggish on mine with more complex content). However, I'm facing this issue after opening and closing a TextInput in the bottom sheet:

https://github.com/lodev09/react-native-true-sheet/assets/56821670/7bc02b78-e764-44ce-8831-44b519eadd19

I'm using a FlatList inside the bottom sheet, which works well as it expands to full while scrolling down the list. After opening and closing the TextInput, the sheet cannot be extended to full anymore.

For additional context, I'm wrapping everything with a KeyboardAvoidingView with its behavior set to "height".

Thanks!

lodev09 commented 2 months ago

Keyboard is already handled internally. Try to remove KeyboardAvoidingView and see if that works.

keith-badulis commented 2 months ago

Hello, I've removed KeyboardAvoidingView but the issue still persists. I'm also currently using Expo 51 with React Native 0.74.2.

This issue only occurs when using FlatList.

lodev09 commented 2 months ago

I see the issue. It has something to do with FlatList not working well with SOFT_INPUT_ADJUST_RESIZE mode for the keyboard :/

There's no general solution for now so I'm going to expose a prop to configure the input mode of the sheet.

lodev09 commented 2 months ago

@keith-badulis PR #42 should handle this for you. Give a test and let me know how it goes.

Thanks

keith-badulis commented 2 months ago

Hello, thank you very much for this fix! I'll start migrating to this package. Looking forward to more features in the future!