-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Provide a ForwardRef for position value #1187
Comments
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
I don't think a ref would work since it means you can't use it for the first render, and you won't get updated value until next render since changing a ref doesn't trigger re-render. Open to other ideas tho. |
Maybe asking for a forward ref specifically was the wrong way to go about this, I just assumed since passing a |
This is also problematic since it means whatever animation user is doing will be completely JS-based and unable to use native driver. |
Current behaviour
After the v2 update, the passing of a
position
ref no longer works. This would be useful for animating other components according to the pager view position outside of theTabView
hierarchy.Expected behaviour
I expected a
position
ref passed as theposition
prop toTabView
would give me the ability to use theTabView
position in other components outside of theTabView
hierarchy, as proposed in issue #781 and merged in PR #782.Code sample
Screenshots (if applicable)
What have you tried
I have clumsily hacked around the issue by pulling the
position
value from therenderTabBar
function, as theposition
prop is passed there. This works but is less than ideal, especially if I have no need to replace the defaultTabBar
.Here is my workaround (copied from #781 (comment)):
Your Environment
The text was updated successfully, but these errors were encountered: