Skip to content

Commit

Permalink
Merge pull request #86 from estatesales-org/functional-ref
Browse files Browse the repository at this point in the history
Export InputSpinner via forwardRef
  • Loading branch information
marcocesarato authored Feb 16, 2023
2 parents 3752e39 + b95cd8c commit 0596db1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import InputSpinner from "./InputSpinner";
import {getSkin} from "./Skins";

// Export
export default (props) => {
export default React.forwardRef((props, ref) => {
const skinProps = getSkin(props.skin, props);
const finalProps = {...props, ...skinProps};
return <InputSpinner {...finalProps} />;
};
return <InputSpinner {...finalProps} ref={ref} />;
});

0 comments on commit 0596db1

Please sign in to comment.