Skip to content
Snippets Groups Projects
Commit cb1e7189 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix lint and flow errors that were missed due to FE linters being removed from CI

parent 4d90af4f
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,7 @@ type Props = {
parameterId: ParameterId,
defaultValue: string,
) => void,
setParameterIndex: (parameterId: ParameterId, index: number) => void,
editingParameter: ?Parameter,
......
......@@ -38,6 +38,7 @@ type Props = {
parameterId: ParameterId,
defaultValue: string,
) => void,
setParameterIndex?: (parameterId: ParameterId, index: number) => void,
removeParameter?: (parameterId: ParameterId) => void,
setEditingParameter?: (parameterId: ParameterId) => void,
};
......@@ -100,9 +101,17 @@ export default class Parameters extends Component {
}
}
handleSortEnd = ({ oldIndex, newIndex }) => {
handleSortEnd = ({
oldIndex,
newIndex,
}: {
oldIndex: number,
newIndex: number,
}) => {
const { parameters, setParameterIndex } = this.props;
setParameterIndex(parameters[oldIndex].id, newIndex);
if (setParameterIndex) {
setParameterIndex(parameters[oldIndex].id, newIndex);
}
};
render() {
......@@ -189,7 +198,6 @@ import {
SortableContainer,
SortableElement,
SortableHandle,
arrayMove,
} from "react-sortable-hoc";
const StaticParameterWidgetList = ({ children, ...props }) => {
......
......@@ -278,7 +278,7 @@ export default class NativeQueryEditor extends Component {
}
};
setParameterIndex = (parameterId, parameterIndex) => {
setParameterIndex = (parameterId: ParameterId, parameterIndex: number) => {
const { query, setDatasetQuery } = this.props;
query
.setParameterIndex(parameterId, parameterIndex)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment