Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update types

dominik-zeglene57d47ca9447
diff --git a/saleor/static/dashboard-next/storybook/stories/components/ColumnPicker.tsx b/saleor/static/dashboard-next/storybook/stories/components/ColumnPicker.tsx
index 6bc1f3350d..ed0ce2b247 100644
--- a/saleor/static/dashboard-next/storybook/stories/components/ColumnPicker.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/components/ColumnPicker.tsx
@@ -27,6 +27,10 @@ const columns: ColumnPickerChoice[] = [
const props: ColumnPickerProps = {
columns,
initial: true,
+ onCancel: () => undefined,
+ onColumnToggle: () => undefined,
+ onReset: () => undefined,
+ onSave: () => undefined,
selectedColumns: [1, 3, 4, 6].map(index => columns[index].value)
};
diff --git a/saleor/static/dashboard-next/storybook/stories/products/ProductListPage.tsx b/saleor/static/dashboard-next/storybook/stories/products/ProductListPage.tsx
index 12b6de38c0..c5c43dc0a7 100644
--- a/saleor/static/dashboard-next/storybook/stories/products/ProductListPage.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/products/ProductListPage.tsx
@@ -1,6 +1,8 @@
import { storiesOf } from "@storybook/react";
import React from "react";
+import { defaultListSettings } from "@saleor/config";
+import { ListViews } from "@saleor/types";
import placeholderImage from "../../../../images/placeholder255x255.png";
import { category as categoryFixture } from "../../../categories/fixtures";
import {
@@ -22,10 +24,11 @@ const props: ProductListPageProps = {
...listActionsProps,
...pageListProps.default,
...filterPageProps,
+ defaultSettings: defaultListSettings[ListViews.PRODUCT_LIST],
products,
settings: {
...pageListProps.default.settings,
- columns: ["thumbnail"]
+ columns: ["isPublished", "productType", "price"]
}
};
diff --git a/saleor/static/dashboard-next/types.ts b/saleor/static/dashboard-next/types.ts
index 777042b5d7..dad6b89521 100644
--- a/saleor/static/dashboard-next/types.ts
+++ b/saleor/static/dashboard-next/types.ts
@@ -15,6 +15,7 @@ export interface ListSettings<TColumn extends string = string> {
}
export enum ListViews {
+ ATTRIBUTE_LIST = "ATTRIBUTE_LIST",
CATEGORY_LIST = "CATEGORY_LIST",
COLLECTION_LIST = "COLLECTION_LIST",
CUSTOMER_LIST = "CUSTOMER_LIST",
@@ -60,7 +61,7 @@ export interface ListActions extends ListActionsWithoutToolbar {
}
export interface PageListProps<TColumns extends string = string>
extends ListProps<TColumns> {
- defaultSettings: ListSettings<TColumns>;
+ defaultSettings?: ListSettings<TColumns>;
onAdd: () => void;
}
export interface FilterPageProps<TUrlFilters> {