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/21 12:19:40 UTC

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

kgabryje commented on a change in pull request #18120:
URL: https://github.com/apache/superset/pull/18120#discussion_r789612516



##########
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:
       Agreed, `defaultValue` is a better name than `default`, but changing that would require applying the same change in multiple plugins that use that component. Sounds like a separate PR




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