diff --git a/src/components/TableHead/TableHead.tsx b/src/components/TableHead/TableHead.tsx
index 82a078e83..0ee28e0ec 100644
--- a/src/components/TableHead/TableHead.tsx
+++ b/src/components/TableHead/TableHead.tsx
@@ -23,10 +23,10 @@ export interface TableHeadProps extends MuiTableHeadProps {
colSpan: number;
disabled: boolean;
dragRows?: boolean;
- selected: number;
+ selected?: number;
items: Node[];
toolbar?: React.ReactNode | React.ReactNodeArray;
- toggleAll: (items: Node[], selected: number) => void;
+ toggleAll?: (items: Node[], selected: number) => void;
}
const styles = (theme: Theme) =>
@@ -101,25 +101,26 @@ const TableHead = withStyles(styles, {
})}
/>
)}
- {(items === undefined || items.length > 0) && (
-
- 0) &&
+ (selected && (
+ selected && selected > 0
+ [classes.checkboxSelected]: selected,
+ [classes.dragRows]: dragRows
})}
- checked={selected === 0 ? false : true}
- disabled={disabled}
- onChange={() => toggleAll(items, selected)}
- />
-
- )}
+ >
+ selected && selected > 0
+ })}
+ checked={selected === 0 ? false : true}
+ disabled={disabled}
+ onChange={() => toggleAll(items, selected)}
+ />
+
+ ))}
{selected ? (
<>
-
- {i18n.t("Status")}
-
+ {i18n.t("Status")}
;
+ errors: FormErrors<"name" | "configuration">;
disabled: boolean;
onChange: (event: React.ChangeEvent) => void;
}
@@ -64,6 +61,7 @@ const PluginSettings = withStyles(styles, { name: "PluginSettings" })(
? configuration.value === "true"
: configuration.value
}
+ disabled={disabled}
label={configuration.label}
name={configuration.name}
onChange={onChange}
diff --git a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx
index 34f34b72d..43ea9101b 100644
--- a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx
+++ b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx
@@ -11,6 +11,7 @@ import { UserError } from "@saleor/types";
import React from "react";
import i18n from "../../../i18n";
+import { Plugin_plugin } from "../../types/Plugin";
import PluginInfo from "../PluginInfo";
import PluginSettings from "../PluginSettings";
@@ -30,7 +31,7 @@ export interface FormData {
export interface PluginsDetailsPageProps {
disabled: boolean;
errors: UserError[];
- plugin: FormData;
+ plugin: Plugin_plugin;
saveButtonBarState: ConfirmButtonTransitionState;
onBack: () => void;
onSubmit: (data: FormData) => void;
@@ -54,23 +55,22 @@ const PluginsDetailsPage: React.StatelessComponent = ({
return (