Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vision-os] background blur overlay when focusing SearchBar #2579

Closed
kanapan opened this issue Dec 18, 2024 · 2 comments
Closed

[vision-os] background blur overlay when focusing SearchBar #2579

kanapan opened this issue Dec 18, 2024 · 2 comments
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario

Comments

@kanapan
Copy link

kanapan commented Dec 18, 2024

Description

image image

When focusing on the SearchBar component, a background blur effect is applied to the content behind it. This behavior is undesirable for certain use cases, and there is currently no straightforward way to disable or customize the blur effect.

Is there a way to address this issue or any workaround to disable or modify the blur effect?

Steps to reproduce

1.Render a screen with a SearchBar.
2.Focus the SearchBar.
3.Observe the background content being blurred.

code

import { useRef, useState } from 'react';

import HomeScreen from '../../screens/home/home-screen';
import type React from 'react';
import type { SearchBarCommands } from 'react-native-screens';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

export type HomeNavigatorParamList = {
  Home: { searchQuery: string };
};

const Stack = createNativeStackNavigator();

const HomeNavigator = (): React.ReactElement => {
  const searchBarRef = useRef<SearchBarCommands>(null);
  const [searchQuery, setSearchQuery] = useState('');

  return (
    <Stack.Navigator>
      <Stack.Screen
        name="HomeScreen"
        component={HomeScreen}
        options={({ navigation }) => {
          return {
            title: 'Home',
            headerTransparent: true,
            headerSearchBarOptions: {
              placement: 'inline',
              obscureBackground: false,
              ref: searchBarRef,
            },
            contentStyle: {
              backgroundColor: 'transparent',
            },
          };
        }}
      />
    </Stack.Navigator>
  );
};

export default HomeNavigator;

Screens version

4.3.0

React Native version

0.76.5

Platforms

VisionOS

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Missing repro This issue need minimum repro scenario labels Dec 18, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot removed the Platform: iOS This issue is specific to iOS label Dec 18, 2024
Copy link

github-actions bot commented Dec 18, 2024

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@github-actions github-actions bot added the Missing info The user didn't precise the problem enough label Dec 18, 2024
@kanapan kanapan closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario
Projects
None yet
Development

No branches or pull requests

1 participant