Skip to content

Image组件是否可以使用forwardRef定义,目前无法传入ref #372

Open

Description

@SimerW

import Image from 'rc-image';

export const MyComponent = () {
const ref = useRef(null)
return <Image src="XXX" ref={ref}
}

上述场景中想要传入ref到Image组件内部,绑定在img元素上,但是目前无法实现

Activity

  1. afc163 commented on Oct 10, 2024

    @afc163
    Member

    PR is welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions