Skip to content

Normal HTML attributes aren't being applied correctly #6

@webbower

Description

@webbower

When I use the Image component and I pass in normal HTML attributes, including native event handlers, they are getting converted to snake case inside the Image component and so they are ignored by React's img component (attributes and handlers aren't being applied properly to the resulting HTML element). You can see what I'm talking about in the attached screenshot of the React dev tools.

developer_tools_-_http___localhost_3000_products_my-product-3_trk_vendor_dashboard_products_panel

My suspicion is that the function call on this line https://github.com/cloudinary/cloudinary-react/blob/master/src/components/Image/Image.js#L107 is not handling the React-style of camel case attributes correctly. And there doesn't seem to be any notes on how to specially handle native HTML attributes in the docs for this component.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions