Skip to content

Commit

Permalink
[lab] Fix React's forwardRef warning when importing from the index (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Jun 13, 2022
1 parent 635c5be commit d66f1b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mui-lab/src/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ type DatePickerComponent = (<TDate>(
*/
const DatePicker = React.forwardRef(function DeprecatedDatePicker<TDate>(
props: DatePickerProps<TDate>,
ref: React.Ref<any>,
) {
warn();

return <XDatePicker {...props} />;
return <XDatePicker ref={ref} {...props} />;
}) as DatePickerComponent;

DatePicker.propTypes /* remove-proptypes */ = {
Expand Down

0 comments on commit d66f1b6

Please sign in to comment.