question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] SearchBar improperly renders Child Component in Landscape Mode

See original GitHub issue

Hi, There is some weird display issue we are encountering while using SearchBar in iOS. From SearchBar it re-renders child component and we noticed the child component is not displaying properly if the View or SafeAreaView component is added.

Here I took the sample app: redux and added following

  • Added SearchBar in People
  • Wrapped FlatList to SafeAreaView
  • Added wrapped view component under SearchBar as child component

And here is how it’s displayed in landscape mode: Simulator Screen Shot - iPhone 11 - 2020-11-16 at 14 16 46

After tapping couple times of SearchBar, the view renders properly. I have attached video as well. SampleVideo.mov.zip

Please let me know if you need any more information

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ndcocommented, Nov 17, 2020

Thank you @grahammendick for your findings and help! I noticed they have set contentInsetAdjustmentBehavior to always instead of automatic

That solved alignment only one leftside and then the bar goes beyond the screen to the right… 😦 Think we will investigate more on this but it turned out that this isn’t the issue from here 😃

Thank you again for your help! Will close this issue

0reactions
grahammendickcommented, Nov 17, 2020

No problem, glad I could help

Read more comments on GitHub >

github_iconTop Results From Across the Web

uisearch bar width is reduced when change orientation from ...
I am using tableview with search bar display controller, it shows good in portait and landscape view, but rotate from landscape to portrait ......
Read more >
iOS 16 unexpected rotation behaviour - Apple Developer
While on iOS 15 or earlier, the app remains at Landscape and only rotates to Portrait when physical device's orientation changes.
Read more >
Don't use 100vh for mobile responsive - DEV Community ‍ ‍
I work with Windows 11 + WSLg in my personal desktop and Windows 10 + WSL2 in company's laptop so I bought an...
Read more >
[Orientation] Re-Layout on orientation change #25 - GitHub
How should I re-layout the page when the orientation of the device changes? I noticed none of the demo apps seem to support...
Read more >
Components - NativeBase
NativeBase includes components such as anatomy of your app screens, header, input, buttons, badge, icon, form, checkbox, radio-button, list, card, actionsheet, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found