administrate-field-enum icon indicating copy to clipboard operation
administrate-field-enum copied to clipboard

Add option to filter select values

Open superkat64 opened this issue 4 years ago • 0 comments

Why?

We had the need to restrict certain enum values from the dropdown select form

Changes

  • Added option_filter which returns either a no-op filter proc by default or a filter proc that evaluates and filters the provided options and & filtered_options to return the new select options array
  • Updated form.erb to use filtered_options

superkat64 avatar Jun 11 '21 16:06 superkat64