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

Render Image inside a Fixed View tag with render function causes undefined, reading 'width' issue #1587

Open
morningcocoa opened this issue Nov 8, 2021 · 7 comments
Labels

Comments

@morningcocoa
Copy link

morningcocoa commented Nov 8, 2021

I get error:
Error: TypeError: Cannot read properties of undefined (reading 'width')

when trying to add an image/logo to a fixed View tag, and it needs to be the render function because I need the pageNumber logic

<View style={styles.pageNumber} render={({ pageNumber, totalPages }) => (
    <Image src="https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg" />
  )} fixed />

This use to work in 1.6, and I may have to revert back to version1

@morningcocoa morningcocoa changed the title Render Image inside a Fixed View tag causes undefined, 'width' issue Render Image inside a Fixed View tag causes undefined, reading 'width' issue Nov 8, 2021
@morningcocoa morningcocoa changed the title Render Image inside a Fixed View tag causes undefined, reading 'width' issue Render Image inside a Fixed View tag with render function causes undefined, reading 'width' issue Nov 8, 2021
@petercsaki
Copy link

Having the same problem.
It doesn't have to be fixed. Image in a View's render is having this problem.


node.image is undefined

@ravithesun02
Copy link

any workaround for this issue ?

@ravithesun02
Copy link

I am facing the same issue in latest version as well . i am using @react-pdf/renderer

@Ionito
Copy link

Ionito commented Oct 9, 2023

Hi, any solution to this issue? :-(

@vilenleung
Copy link

emm....it's not fixed now?

@jegangits
Copy link

emm....it's not fixed now?

yes still i am getting errors like that

@Justinio99
Copy link

I just created a PR for this issue:
#2465

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants