Skip to content

Commit d8a695b

Browse files
chore: Fixed visibilitys of search bar
Signed-off-by: Francisco Javier Arceo <[email protected]>
1 parent 8a999db commit d8a695b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ui/src/pages/Layout.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Layout = () => {
3232
// because it has to be under routes
3333
// in order to use useParams
3434
let { projectName } = useParams();
35-
const [isSearchOpen, setIsSearchOpen] = useState(false);
35+
const setIsSearchOpen = useState(false);
3636
const searchRef = useRef<RegistrySearchRef>(null);
3737

3838
const { data: projectsData } = useLoadProjectsList();
@@ -85,7 +85,6 @@ const Layout = () => {
8585
: [];
8686

8787
const handleSearchOpen = () => {
88-
setIsSearchOpen(true);
8988
setTimeout(() => {
9089
if (searchRef.current) {
9190
searchRef.current.focusSearchInput();
@@ -127,11 +126,11 @@ const Layout = () => {
127126

128127
<EuiPageBody>
129128
<EuiErrorBoundary>
130-
{isSearchOpen && data && (
129+
{data && (
131130
<EuiPageHeader
132131
paddingSize="l"
133132
style={{
134-
position: "sticky",
133+
// position: "sticky",
135134
top: 0,
136135
zIndex: 100,
137136
borderBottom: "1px solid #D3DAE6",

0 commit comments

Comments
 (0)