Skip to content

RefreshControl tintColor Not Working in ScrollView (React Native 0.75.2) #46631

Description

@khanh21011999

Description

I've discovered an issue with the tintColor property of RefreshControl within ScrollView components in React Native version 0.75.2. The specified tintColor is not being applied to the refresh indicator as expected.

Description of the issue:
When setting the tintColor prop on the RefreshControl of a ScrollView, the specified color is not being applied to the refresh indicator. The indicator continues to display in its default color instead of the tintColor provided.

Steps to reproduce

  1. Create a new React Native project using version 0.75.2
  2. Implement a ScrollView with RefreshControl, specifying a tintColor
  3. Pull to refresh and observe that the tint color is not applied to the refresh indicator

Example code:

importReact,{useState}from'react';import{ScrollView,RefreshControl,Text}from'react-native';constRefreshControlExample=()=>{const[refreshing,setRefreshing]=useState(false);constonRefresh=()=>{setRefreshing(true);// Simulating an async operationsetTimeout(()=>setRefreshing(false),2000);};return(<ScrollViewrefreshControl={<RefreshControlrefreshing={refreshing}onRefresh={onRefresh}tintColor="red"// This tint color is not being applied/>}><Text>Pull down to see refresh indicator</Text></ScrollView>);};exportdefaultRefreshControlExample;
### ReactNativeVersion0.75.2
### AffectedPlatformsRuntime-iOS
### Outputof`npx react-native info````text
System:
OS: macOS14.5
CPU: (10)arm64AppleM1Pro
Memory: 117.45MB/16.00GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.8.0
path: /usr/local/bin/node
Yarn:
version: 3.6.4
path: ~/.yarn/bin/yarn
npm:
version: 8.19.4
path: ~/.nvm/versions/node/v16.20.2/bin/npm
Watchman:
version: 2024.08.26.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
-DriverKit23.5-iOS17.5-macOS14.5-tvOS17.5-visionOS1.2-watchOS10.5
Android SDK: NotFound
IDEs:
Android Studio: 2024.1AI-241.18034.62.2411.12169540
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 21.0.2
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /Users/khanhlequoc/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": NotFound
react:
installed: 18.3.1
wanted: 18.3.1react-native:
installed: 0.75.2
wanted: 0.75.2react-native-macos: NotFound
npmGlobalPackages:
"*react-native*": NotFound
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: true

Stacktrace or Logs

No log

Reproducer

It work on expo-snack

Screenshots and Videos

Screen.Recording.2024-09-25.at.00.40.30.mov

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions