ad-m commented on a change in pull request #18120:
URL: https://github.com/apache/superset/pull/18120#discussion_r789637762
##########
File path: superset-frontend/src/explore/components/controls/SliderControl.tsx
##########
@@ -17,27 +17,21 @@
* under the License.
*/
import React from 'react';
-import PropTypes from 'prop-types';
import Slider from 'src/components/Slider';
import ControlHeader from 'src/explore/components/ControlHeader';
-const propTypes = {
- onChange: PropTypes.func,
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
+type SliderControlProps = {
+ onChange: (value: number) => void;
+ value: number;
+ default?: number;
};
-const defaultProps = {
- onChange: () => {},
-};
-
-export default function SliderControl(props) {
+export default function SliderControl(props: SliderControlProps) {
+ const { default: defaultValue, ...rest } = props;
Review comment:
I think this is not required, but sure I can added it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]