Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Set initial data
dominik-zeglen24745f4b91a8
diff --git a/saleor/static/dashboard-next/collections/containers/ProductSearch.tsx b/saleor/static/dashboard-next/collections/containers/ProductSearch.tsxindex 47594c5390..84df41627d 100644--- a/saleor/static/dashboard-next/collections/containers/ProductSearch.tsx+++ b/saleor/static/dashboard-next/collections/containers/ProductSearch.tsx@@ -27,10 +27,7 @@ export class SearchProductsProvider extends React.Component<render() {const { children } = this.props;return (- <TypedSearchProductsQuery- variables={{ query: this.state.query }}- skip={!this.state.query}- >+ <TypedSearchProductsQuery variables={{ query: this.state.query }}>{searchOpts => children(this.search, searchOpts)}</TypedSearchProductsQuery>);diff --git a/saleor/static/dashboard-next/orders/containers/OrderVariantSearch.tsx b/saleor/static/dashboard-next/orders/containers/OrderVariantSearch.tsxindex 98a4512b31..a40d41c0a2 100644--- a/saleor/static/dashboard-next/orders/containers/OrderVariantSearch.tsx+++ b/saleor/static/dashboard-next/orders/containers/OrderVariantSearch.tsx@@ -34,10 +34,7 @@ export class OrderVariantSearchProvider extends React.Component<render() {const { children } = this.props;return (- <TypedOrderVariantSearch- variables={{ search: this.state.query }}- skip={!this.state.query}- >+ <TypedOrderVariantSearch variables={{ search: this.state.query }}>{searchOpts =>children({ variants: { search: this.search, searchOpts } })}diff --git a/saleor/static/dashboard-next/orders/containers/UserSearch.tsx b/saleor/static/dashboard-next/orders/containers/UserSearch.tsxindex b9dede127b..a79dfd8f33 100644--- a/saleor/static/dashboard-next/orders/containers/UserSearch.tsx+++ b/saleor/static/dashboard-next/orders/containers/UserSearch.tsx@@ -26,10 +26,7 @@ export class UserSearchProvider extends React.Component<render() {const { children } = this.props;return (- <TypedUserSearch- variables={{ search: this.state.query }}- skip={!this.state.query}- >+ <TypedUserSearch variables={{ search: this.state.query }}>{searchOpts => children({ search: this.search, searchOpts })}</TypedUserSearch>);diff --git a/saleor/static/dashboard-next/orders/queries.ts b/saleor/static/dashboard-next/orders/queries.tsindex fa66573fee..cb21ba70a4 100644--- a/saleor/static/dashboard-next/orders/queries.ts+++ b/saleor/static/dashboard-next/orders/queries.ts@@ -227,7 +227,7 @@ export const TypedOrderDetailsQuery = TypedQuery<export const orderVariantSearchQuery = gql`query OrderVariantSearch($search: String!) {- products(query: $search, first: 20) {+ products(query: $search, first: 5) {edges {node {id@@ -250,7 +250,7 @@ export const TypedOrderVariantSearch = TypedQuery<export const userSearchQuery = gql`query UserSearch($search: String!) {- customers(query: $search, first: 20) {+ customers(query: $search, first: 5) {edges {node {iddiff --git a/saleor/static/dashboard-next/productTypes/containers/AttributeSearch.tsx b/saleor/static/dashboard-next/productTypes/containers/AttributeSearch.tsxindex 345d873513..64cfb9171f 100644--- a/saleor/static/dashboard-next/productTypes/containers/AttributeSearch.tsx+++ b/saleor/static/dashboard-next/productTypes/containers/AttributeSearch.tsx@@ -28,10 +28,7 @@ export class AttributeSearchProvider extends React.Component<const { children } = this.props;if (typeof children === "function") {return (- <TypedSearchAttributeQuery- variables={{ search: this.state.query }}- skip={!this.state.query}- >+ <TypedSearchAttributeQuery variables={{ search: this.state.query }}>{props => children(this.search, props)}</TypedSearchAttributeQuery>);