Skip to content

Image Component doesn't honor onLoad passed to it. #2206

@TomJKlug

Description

@TomJKlug

Explain what you did

Image Component onLoad is not being fired. When given a function through props.

Expected behavior

I expect the onLoad I supply to the Image Component to run.

Describe the bug

The Image component doesn't honor my onLoad function and instead only runs its own onLoad method.

To Reproduce

  1. Create and Image component
  2. Give it an onLoad function that console logs
  3. Have it run
  4. It won't console log.

<ImageComponent testID="RNE__Image" {...attributes} onLoad={this.onLoad}

The problem is here in Image.js

Your Environment (please complete the following information):

react-native-elements 1.2.7
react-native 0.61.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions