diff --git a/src/PickerInput/RangePicker.tsx b/src/PickerInput/RangePicker.tsx index a850a96cd..43d32233f 100644 --- a/src/PickerInput/RangePicker.tsx +++ b/src/PickerInput/RangePicker.tsx @@ -741,7 +741,7 @@ function RangePicker( } const RefRangePicker = React.forwardRef(RangePicker) as ( - props: RangePickerProps & { ref?: React.Ref }, + props: RangePickerProps & React.RefAttributes, ) => React.ReactElement; if (process.env.NODE_ENV !== 'production') { diff --git a/src/PickerInput/SinglePicker.tsx b/src/PickerInput/SinglePicker.tsx index a90f31ec8..ac05fc142 100644 --- a/src/PickerInput/SinglePicker.tsx +++ b/src/PickerInput/SinglePicker.tsx @@ -653,7 +653,7 @@ function Picker( } const RefPicker = React.forwardRef(Picker) as ( - props: PickerProps & { ref?: React.Ref }, + props: PickerProps & React.RefAttributes, ) => React.ReactElement; if (process.env.NODE_ENV !== 'production') { diff --git a/src/PickerPanel/index.tsx b/src/PickerPanel/index.tsx index abcb20582..ea067b06b 100644 --- a/src/PickerPanel/index.tsx +++ b/src/PickerPanel/index.tsx @@ -417,5 +417,5 @@ if (process.env.NODE_ENV !== 'production') { // Make support generic export default RefPanelPicker as ( - props: PickerPanelProps & { ref?: React.Ref }, + props: PickerPanelProps & React.RefAttributes, ) => React.ReactElement; diff --git a/tests/picker.spec.tsx b/tests/picker.spec.tsx index 5469f04e9..f6a6bdadd 100644 --- a/tests/picker.spec.tsx +++ b/tests/picker.spec.tsx @@ -1262,4 +1262,17 @@ describe('Picker.Basic', () => { }), ); }); + + it('classNames.popup', () => { + render( + , + ); + + expect(document.querySelector('.rc-picker-dropdown')).toHaveClass('bamboo'); + }); });