Commit e874bd63 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed searchbar handling many search quantities. #347.

parent e4191b32
Pipeline #74906 passed with stages
in 23 minutes and 38 seconds
......@@ -10,7 +10,13 @@ import { apiContext } from '../api'
* A few helper functions related to format and analyse suggested options
*/
const Options = {
split: (suggestion) => suggestion.split('='),
split: (suggestion) => {
let [quantity, value] = suggestion.split('=')
if (value && searchQuantities[quantity] && searchQuantities[quantity].many) {
value = value.split(',')
}
return [quantity, value]
},
join: (quantity, value) => `${quantity}=${value}`,
splitForCompare: (suggestion) => {
const [quantity, value] = suggestion.split('=')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment