Skip to content

Conversation

TechnoBlogger14o3
Copy link

This pull request resolves ???

Description

Affected platforms

  • Android
  • iOS

Test plan/screenshots/videos

- Extract ref from pagerProps to avoid conflicts with forwardRef
- Handle both forwardRef and pagerProps ref properly using useImperativeHandle
- Fix TypeError: Cannot assign to read-only property 'current' on pagerProps ref
- Add comprehensive test coverage for ref handling scenarios
- Resolves issue netguru#414

The issue occurred when users passed a ref through pagerProps, causing
a conflict with the internal ref handling in the Pager component.
This fix properly separates the refs and handles both cases.
- Extract ref from pagerProps to avoid conflicts with forwardRef
- Handle both forwardRef and pagerProps ref properly using useImperativeHandle
- Fix TypeError: Cannot assign to read-only property 'current' on pagerProps ref
- Add comprehensive test coverage for ref handling scenarios
- Resolves issue netguru#414

The issue occurred when users passed a ref through pagerProps, causing
a conflict with the internal ref handling in the Pager component.
This fix properly separates the refs and handles both cases.
- Fix unused parameter warnings in mock functions
- Add missing 'page' property to mock props
- Simplify test cases to focus on ref functionality
- Remove complex pagerProps testing that doesn't match component interface
- Import PagerMethods type for proper ref typing
- Replace 'any' types with PagerMethods for better type safety
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

Successfully merging this pull request may close these issues.

1 participant