1
0
Fork 0

update to fix search for flag dropdown

Dieser Commit ist enthalten in:
Robert Barrow 2019-10-12 18:55:01 +01:00
Ursprung fc602db262
Commit 7e0c2b37f4

Datei anzeigen

@ -1,8 +1,7 @@
class CustomWizard::Flag
def initialize(id, name, value)
def initialize(id, name)
@id = id
@name = name
@value = value
end
def id
@ -12,10 +11,6 @@ class CustomWizard::Flag
def name
@name
end
def value
@value
end
end
class CustomWizard::Flags
@ -25,8 +20,10 @@ class CustomWizard::Flags
flagscollection = []
raw_flags.map do |name, code|
flagscollection << CustomWizard::Flag.new(name, name, code)
raw_flags.map do |name, pic|
# This is super hacky. Adding the trailing space actually stops search breaking in the dropdown! (and doesn't compromise the view!)
# Feeding just name, name will break search
flagscollection << CustomWizard::Flag.new(name, "#{name} ")
end
flagscollection