Fix warning "Unknown prop wrappedRef
on <div> tag..."
GeminiScrollbar should not receive wrappedRef as a property, so remove it using object destructuring.
This commit is contained in:
parent
a79c558763
commit
e20f223e78
1 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,8 @@ import React from 'react';
|
||||||
import GeminiScrollbar from 'react-gemini-scrollbar';
|
import GeminiScrollbar from 'react-gemini-scrollbar';
|
||||||
|
|
||||||
function GeminiScrollbarWrapper(props) {
|
function GeminiScrollbarWrapper(props) {
|
||||||
|
const {wrappedRef, ...wrappedProps} = props;
|
||||||
|
|
||||||
// Enable forceGemini so that gemini is always enabled. This is
|
// Enable forceGemini so that gemini is always enabled. This is
|
||||||
// to avoid future issues where a feature is implemented without
|
// to avoid future issues where a feature is implemented without
|
||||||
// doing QA on every OS/browser combination.
|
// doing QA on every OS/browser combination.
|
||||||
|
@ -25,7 +27,7 @@ function GeminiScrollbarWrapper(props) {
|
||||||
// By default GeminiScrollbar allows native scrollbars to be used
|
// By default GeminiScrollbar allows native scrollbars to be used
|
||||||
// on macOS. Use forceGemini to enable Gemini's non-native
|
// on macOS. Use forceGemini to enable Gemini's non-native
|
||||||
// scrollbars on all OSs.
|
// scrollbars on all OSs.
|
||||||
return <GeminiScrollbar ref={props.wrappedRef} forceGemini={true} {...props}>
|
return <GeminiScrollbar ref={wrappedRef} forceGemini={true} {...wrappedProps}>
|
||||||
{ props.children }
|
{ props.children }
|
||||||
</GeminiScrollbar>;
|
</GeminiScrollbar>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue