Skip to content

Commit a799ac4

Browse files
authored
fix: add options_for_filter method to BadgeField (#3710)
1 parent be753a5 commit a799ac4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lib/avo/fields/badge_field.rb

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ def initialize(id, **args, &block)
1111
default_options = {info: :info, success: :success, danger: :danger, warning: :warning, neutral: :neutral}
1212
@options = args[:options].present? ? default_options.merge(args[:options]) : default_options
1313
end
14+
15+
def options_for_filter
16+
@options.values.flatten.uniq
17+
end
1418
end
1519
end
1620
end

0 commit comments

Comments
 (0)