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:
Ursprung
fc602db262
Commit
7e0c2b37f4
1 geänderte Dateien mit 7 neuen und 10 gelöschten Zeilen
13
lib/flags.rb
13
lib/flags.rb
|
@ -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
|
||||
|
|
Laden …
In neuem Issue referenzieren