Skip to content
  • Brady Pascoe's avatar
    fix(AbstractNav): allow passed in refs to be properly forwarded (#4031) · bda567fb
    Brady Pascoe authored
    
    
    * fix: first pathrough of migration to AbstractNav forwarding ref
    
    does not currently work, due to various bugs
    
    * Various fixes for context functionality for AbstractNav
    
    * Apply suggestions from code review
    
    Co-Authored-By: default avatarJimmy Jia <tesrin@gmail.com>
    
    * Migrate AbstractNav implementation to use hooks in replace of HOC
    
    This reduces the complexity of the AbstractNav implementation,
    especially in regards to how the contexts are integrated with it.
    
    * fix: Nav and TabContainer selectors not finding the right element
    
    This fixes the assertion issues caused by the selectors testing
    implementation details to find the DOM elements, rather than
    testing for something that is gauranteed to be in the
    implementation (E.g. the class `nav` on the Nav component, since
    it's part of the Bootstrap design spec) of the rendered DOM
    element.
    
    * fix: AbstractNav not properly merging both of its refs
    
    Currently, we use a ref to gain access to the underlying
    component to implement our own functionality. However, this causes
    an issue with not allowing the user to forward their own ref
    to gain access to the underlying component. using `useMergedRefs`,
    we are able to forward both refs to the underlying component.
    
    * use useMergedHooks from restart/hooks
    bda567fb