mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Implements the filter options feature
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MultipleCheckedSelectComponent < ViewComponent::Base
|
||||
def initialize(name:, options:, selected:)
|
||||
def initialize(name:, options:, selected:, filter_placeholder: "Filter options")
|
||||
@name = name
|
||||
@filter_placeholder = filter_placeholder
|
||||
@options = options
|
||||
@selected = selected.map(&:to_sym)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user