Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix filters in category page
Marcin Gębala423822c76b7f
diff --git a/saleor/static/js/components/categoryPage/ProductFilters.js b/saleor/static/js/components/categoryPage/ProductFilters.jsindex e0f25c766a..fecf972ed8 100644--- a/saleor/static/js/components/categoryPage/ProductFilters.js+++ b/saleor/static/js/components/categoryPage/ProductFilters.js@@ -20,12 +20,12 @@ class ProductFilters extends Component {onFilterChanged: PropTypes.func.isRequired}- getFilterKey(attributeName, valueSlug) {- return `${attributeName}:${valueSlug}`;+ getFilterKey(attributeSlug, valueSlug) {+ return `${attributeSlug}:${valueSlug}`;}- onClick = (attributeName, valueSlug) => {- this.props.onFilterChanged(this.getFilterKey(attributeName, valueSlug));+ onClick = (attributeSlug, valueSlug) => {+ this.props.onFilterChanged(this.getFilterKey(attributeSlug, valueSlug));}changeVisibility = (target) => {@@ -36,10 +36,10 @@ class ProductFilters extends Component {componentWillMount() {this.props.attributes.map((attribute) => {- const attrValue = `${attribute.name}`;- this.setState({- visibility: Object.assign(this.state.visibility, {[attrValue]: !isMobile()})- });+ const attrValue = `${attribute.slug}`;+ this.setState({+ visibility: Object.assign(this.state.visibility, {[attrValue]: !isMobile()})+ });});}@@ -88,12 +88,12 @@ export default Relay.createContainer(ProductFilters, {fragment on ProductAttributeType @relay(plural: true) {idpk- slugname+ slugvalues {id- slugname+ slugcolor}}