You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently create the ref inside the hook and expose it to the consumer.
This works fine but also isn't very flexible. If the consumer wants to use another ref on the same element, they would have to merge the ref from our hook + the other one when attaching it to the element.
We should instead have the consumer pass the React.RefObject<HTMLInputElement | HTMLTextAreaElement> into the hook.
This would be a breaking change so we'd need to create a v2.0.0 release.
The text was updated successfully, but these errors were encountered:
It's all yours, @logicalahara 😄 Thanks for the help!
For reference/a starting point, my original implementation when initially developing this hook (way back before releasing v1.0.0) had the ref getting passed in.
We currently create the ref inside the hook and expose it to the consumer.
This works fine but also isn't very flexible. If the consumer wants to use another ref on the same element, they would have to merge the ref from our hook + the other one when attaching it to the element.
We should instead have the consumer pass the
React.RefObject<HTMLInputElement | HTMLTextAreaElement>
into the hook.This would be a breaking change so we'd need to create a
v2.0.0
release.The text was updated successfully, but these errors were encountered: