Skip to content

Commit

Permalink
Controls: forward ref (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson authored Jan 17, 2025
1 parent 42e00d0 commit abbbb1a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/r3f/components/CameraControls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ const ControlsBaseComponent = forwardRef( function ControlsBaseComponent( props,

} );

export function EnvironmentControls( props ) {
export const EnvironmentControls = forwardRef( function EnvironmentControls( props, ref ) {

return <ControlsBaseComponent { ...props } controlsConstructor={ EnvironmentControlsImpl } />;
return <ControlsBaseComponent { ...props } ref={ ref } controlsConstructor={ EnvironmentControlsImpl } />;

}
} );

export function GlobeControls( props ) {
export const GlobeControls = forwardRef( function GlobeControls( props, ref ) {

return <ControlsBaseComponent { ...props } controlsConstructor={ GlobeControlsImpl } />;
return <ControlsBaseComponent { ...props } ref={ ref } controlsConstructor={ GlobeControlsImpl } />;

}
} );

0 comments on commit abbbb1a

Please sign in to comment.