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

API mis-match - totalPages prop in View Render Prop #3006

Open
syedabuthahirm opened this issue Dec 24, 2024 · 0 comments
Open

API mis-match - totalPages prop in View Render Prop #3006

syedabuthahirm opened this issue Dec 24, 2024 · 0 comments

Comments

@syedabuthahirm
Copy link

Describe the bug
In Docs View render prop doen't have totalPages. but in playground app if i try to print render props am able to see totalPages.

To Reproduce

  1. Go to React PDF - Play Ground
  2. Replace the Text Component (Page Number) with View Component as mentioned below
// Old Code
<Text style={styles.pageNumber} render={({ pageNumber, totalPages }) => (
  `${pageNumber} / ${totalPages}`
)} fixed />
// New Code
<View style={styles.pageNumber} render={(t) => <Text>{JSON.stringify(t)}</Text>} fixed />

Screenshots
image

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

No branches or pull requests

1 participant