Skip to content

Commit

Permalink
Merge pull request #7626 from LedgerHQ/bugfix/LIVE-13727
Browse files Browse the repository at this point in the history
fix: hidden header should show again when searching [LIVE-13727]
  • Loading branch information
Justkant authored Aug 20, 2024
2 parents 87c160d + aa0126a commit 17ca82c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-bikes-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

fix: hidden header should show again when searching
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import type { SearchProps } from "LLM/features/Web3Hub/types";
Expand All @@ -13,6 +13,11 @@ export default function Web3HubSearch({ navigation }: SearchProps) {
const [search, setSearch] = useState("");
const { layoutY, scrollHandler } = useScrollHandler(TOTAL_HEADER_HEIGHT);

// Reset the layoutY value when search changes
useEffect(() => {
layoutY.value = 0;
}, [layoutY, search]);

return (
<SafeAreaView edges={edges} style={{ flex: 1 }}>
<Header navigation={navigation} onSearch={setSearch} layoutY={layoutY} />
Expand Down

0 comments on commit 17ca82c

Please sign in to comment.