0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 11:00:28 +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 class CustomWizard::Flag
def initialize(id, name, value) def initialize(id, name)
@id = id @id = id
@name = name @name = name
@value = value
end end
def id def id
@ -12,10 +11,6 @@ class CustomWizard::Flag
def name def name
@name @name
end end
def value
@value
end
end end
class CustomWizard::Flags class CustomWizard::Flags
@ -25,8 +20,10 @@ class CustomWizard::Flags
flagscollection = [] flagscollection = []
raw_flags.map do |name, code| raw_flags.map do |name, pic|
flagscollection << CustomWizard::Flag.new(name, name, code) # 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 end
flagscollection flagscollection