mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Fix debounce on variant search dropdown
This wasn't applied correctly so there was zero debounce, leading to a big excess of pointless requests whilst typing in the variant search dropdown
This commit is contained in:
@@ -10,10 +10,10 @@ angular.module("admin.utils").directive "variantAutocomplete", ($timeout) ->
|
||||
element.select2
|
||||
placeholder: t('admin.orders.select_variant')
|
||||
minimumInputLength: 3
|
||||
quietMillis: 300
|
||||
ajax:
|
||||
url: Spree.routes.variants_search
|
||||
datatype: "json"
|
||||
quietMillis: 500 # debounce
|
||||
data: (term, page) ->
|
||||
q: term
|
||||
distributor_id: scope.distributor_id
|
||||
|
||||
Reference in New Issue
Block a user