kgabryje commented on code in PR #30697:
URL: https://github.com/apache/superset/pull/30697#discussion_r1815445451
##########
superset-frontend/src/dashboard/components/SliceAdder.tsx:
##########
@@ -41,31 +41,40 @@ import {
NEW_CHART_ID,
NEW_COMPONENTS_SOURCE_ID,
} from 'src/dashboard/util/constants';
-import { slicePropShape } from 'src/dashboard/util/propShapes';
import { debounce, pickBy } from 'lodash';
import Checkbox from 'src/components/Checkbox';
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
+import { Dispatch } from 'redux';
+import { Slice } from 'src/dashboard/types';
import AddSliceCard from './AddSliceCard';
import AddSliceDragPreview from './dnd/AddSliceDragPreview';
import DragDroppable from './dnd/DragDroppable';
-const propTypes = {
- fetchSlices: PropTypes.func.isRequired,
- updateSlices: PropTypes.func.isRequired,
- isLoading: PropTypes.bool.isRequired,
- slices: PropTypes.objectOf(slicePropShape).isRequired,
- lastUpdated: PropTypes.number.isRequired,
- errorMessage: PropTypes.string,
- userId: PropTypes.number.isRequired,
- selectedSliceIds: PropTypes.arrayOf(PropTypes.number),
- editMode: PropTypes.bool,
- dashboardId: PropTypes.number,
+export type SliceAdderProps = {
+ fetchSlices: (
+ userId?: number,
+ filter_value?: string,
+ sortColumn?: string,
+ ) => void;
Review Comment:
I think it shouldn't return void? Probably some Promise?
--
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]