diff --git a/CHANGELOG.md b/CHANGELOG.md index a270be1e4..4ceeae7b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ All notable, unreleased changes to this project will be documented in this file. - Add "Ready to capture" to the "Status" order filter - #430 by @dominik-zeglen - Reset state after closing - #456 by @dominik-zeglen - Password validation errors are not shown - #471 by @gabmartinez +- Filter column ids before send it to GridAttributes operation - #476 by @gabmartinez - Display Is Published column correctly in main Product Listing - #475 by @gabmartinez ## 2.0.0 diff --git a/src/products/views/ProductList/ProductList.tsx b/src/products/views/ProductList/ProductList.tsx index e30d0cb3d..7bf75e1d7 100644 --- a/src/products/views/ProductList/ProductList.tsx +++ b/src/products/views/ProductList/ProductList.tsx @@ -33,6 +33,10 @@ import createFilterHandlers from "@saleor/utils/handlers/filterHandlers"; import useCategorySearch from "@saleor/searches/useCategorySearch"; import useCollectionSearch from "@saleor/searches/useCollectionSearch"; import useProductTypeSearch from "@saleor/searches/useProductTypeSearch"; +import { + getAttributeIdFromColumnValue, + isAttributeColumnValue +} from "@saleor/products/components/ProductListPage/utils"; import ProductListPage from "../../components/ProductListPage"; import { TypedProductBulkDeleteMutation, @@ -215,9 +219,15 @@ export const ProductList: React.FC = ({ params }) => { } ); + function filterColumnIds(columns: ProductListColumns[]) { + return columns + .filter(isAttributeColumnValue) + .map(getAttributeIdFromColumnValue); + } + return ( {attributes => (