BigW Consortium Gitlab

Commit 5447d8b3 by Alfredo Sumaran

Add separator at the end of categories

parent 8b68142a
...@@ -85,10 +85,15 @@ class @SearchAutocomplete ...@@ -85,10 +85,15 @@ class @SearchAutocomplete
data = [] data = []
# List results # List results
firstCategory = true
for suggestion in response for suggestion in response
# Add group header before list each group # Add group header before list each group
if lastCategory isnt suggestion.category if lastCategory isnt suggestion.category
data.push 'divider' if !firstCategory
firstCategory = false if firstCategory
data.push data.push
header: suggestion.category header: suggestion.category
......
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