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 20:35:34 UTC

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

mik-laj commented on a change in pull request #18120:
URL: https://github.com/apache/superset/pull/18120#discussion_r789131031



##########
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:
       ```suggestion
     defaultValue?: number;
   ```
   I'm not sure.




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