0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 17:30:29 +01:00

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)
@id = id
@name = name
@value = value
def initialize(id, name)
@id = id
@name = name
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