Skip to content

Commit

Permalink
[Backend] Remove support for passing hash for variantAutocomplete
Browse files Browse the repository at this point in the history
Instead, pass only

    searchParameters: function (_selectSearchTerm) { return { suppliable_only: true  } }

Ref solidusio#4767
  • Loading branch information
kennyadsl committed Mar 28, 2023
1 parent 22533ed commit 0fe39c7
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@
if (typeof(options) === 'object') {
if (typeof(options['searchParameters']) === 'function') {
return options['searchParameters'](term)
} else {
console.warn(
"Solidus deprecation: Passing an object of parameters to variantAutocomplete is deprecated. Instead, on the options object, please declare `searchParameters` as a function returning the parameters.\n\n",
"Deprecated usage:\n",
"$('#id').variantAutocomplete({\n",
" suppliable_only: true\n",
"})",
"\n\nNew usage:\n",
"$('#id').variantAutocomplete({\n",
" searchParameters: function (_selectSearchTerm) { return { suppliable_only: true } }\n",
"})"
)
}
}

Expand Down

0 comments on commit 0fe39c7

Please sign in to comment.