react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

useHeaderHeight does not update after cancelling search

Open C2thehris opened this issue 1 year ago • 3 comments

Description

See https://github.com/react-navigation/react-navigation/issues/12331

Current behavior

useHeaderHeight() does not update its value when the search bar is closed

https://github.com/user-attachments/assets/7108eaa9-1ba1-4806-ac59-9b8d4910f704

Expected behavior

useHeaderHeight() should update to provide the adjusted height after the search bar is dismissed.

Steps to reproduce

  1. Click search bar
  2. Click "Cancel"

Snack or a link to a repository

https://snack.expo.dev/@c2thehris/useheaderheight-with-searchbar-ios-bug

Screens version

4.4.0

React Native version

0.76

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

None

Device model

No response

Acknowledgements

Yes

C2thehris avatar Jan 10 '25 01:01 C2thehris

Thanks for the report! We'll look into this

kkafar avatar Jan 13 '25 10:01 kkafar

Can confirm this issue.

JustJoostNL avatar Jan 20 '25 15:01 JustJoostNL

Same issue with useAnimatedHeaderHeight,

I opened an issue on react navigation but I think I should have opened it here.

https://github.com/react-navigation/react-navigation/issues/12427

Pnlvfx avatar Feb 06 '25 22:02 Pnlvfx