Skip to content

Commit e9d5db1

Browse files
committed
Update variantAutocomplete to use new search param
Instead of trying to generate some hardcoded Ransack search values, we can use the APIs ability to use our Search::Variant class instead.
1 parent 42fbafa commit e9d5db1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

backend/app/assets/javascripts/spree/backend/variant_autocomplete.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
},
3232
data: function(term, page) {
3333
var searchData = {
34-
q: {
35-
product_name_or_sku_cont: term
36-
},
34+
variant_search_term: term,
3735
token: Spree.api_key
3836
};
3937
return _.extend(searchData, searchOptions);

0 commit comments

Comments
 (0)