From 159c4a4fc0c101ec1bea8cdf1a3779531bdc1399 Mon Sep 17 00:00:00 2001 From: guitavano Date: Mon, 6 Jul 2026 17:10:12 -0300 Subject: [PATCH] fix(vtex): remove duplicate top-level fields from ProductList props MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ProductListProps declared its params twice: once inside the `props` union and again as flat top-level fields (query/count/sort/collection/ hideUnavailableItems). The schema-driven admin form rendered both sets, showing duplicated Count/Collection/Sort/HideUnavailableItems inputs. Keep only the `props` union — the dominant and intended shape (578 of 579 configured blocks use nested `props: {}`). Runtime is unaffected: resolveParams reads `props.props ?? props` and casts to any, so the lone legacy flat block still resolves. Co-Authored-By: Claude Opus 4.8 --- vtex/loaders/intelligentSearch/productList.ts | 5 ----- vtex/loaders/productListFull.ts | 5 ----- 2 files changed, 10 deletions(-) diff --git a/vtex/loaders/intelligentSearch/productList.ts b/vtex/loaders/intelligentSearch/productList.ts index 9abce9c..af79a74 100644 --- a/vtex/loaders/intelligentSearch/productList.ts +++ b/vtex/loaders/intelligentSearch/productList.ts @@ -13,11 +13,6 @@ import type { Product as ProductVTEX } from "../../utils/types"; export interface ProductListProps { props?: CollectionProps | QueryProps | ProductIDProps | FacetsProps; - query?: string; - count?: number; - sort?: string; - collection?: string; - hideUnavailableItems?: boolean; } interface CollectionProps { diff --git a/vtex/loaders/productListFull.ts b/vtex/loaders/productListFull.ts index b9a0ce4..3777a89 100644 --- a/vtex/loaders/productListFull.ts +++ b/vtex/loaders/productListFull.ts @@ -13,11 +13,6 @@ import type { Product as ProductVTEX } from "../utils/types"; export interface ProductListProps { props?: CollectionProps | QueryProps | ProductIDProps | FacetsProps; - query?: string; - count?: number; - sort?: string; - collection?: string; - hideUnavailableItems?: boolean; } /** @title Collection ID */