You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/01/20 21:16:49 UTC

[GitHub] [superset] ad-m commented on a change in pull request #18120: refactor: migrate SliderControl to TypeScript & added story

ad-m commented on a change in pull request #18120:
URL: https://github.com/apache/superset/pull/18120#discussion_r789156508



##########
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;

Review comment:
       It might break users of that components, because we had previously `props.default`, so I need to keep `default`.




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org