Skip to content

fix clearing single-value parameters

JonGold requested to merge JonGold/action-provider:parameter-allow-clear into master

Currently, it's (basically) impossible to clear a selection in the parameter mapping for a single-value field.

Steps to replicate

  • In Form Processor, add any action that has a parameter that takes a single value. That's almost all, but I used "Contribution: create".
  • Map a value to a single-value field.
  • Try to unset that selection.

It's possible if you're savvy and press your "delete" key while the Select2 is focused, but it's obviously not the desired behavior, since the "allowClear" option is set.

The fix is to add a blank option value, which I don't think I need to explain since most of the rest of the code does it.

Before

Selection_1015

After

Selection_1014

Merge request reports