unclecheese / silverstripe-display-logic

The Display Logic module allows you to add conditions for displaying or hiding certain form fields based on client-side behavior.
BSD 3-Clause "New" or "Revised" License
74 stars 71 forks source link

Add Critera api to exit a single group() level #147

Closed NightJar closed 1 year ago

NightJar commented 1 year ago

It was decided that 306f813 was too risky a change that could be considered API breaking and thus a major version jump. To reduce this we can add a new method for explicitly escaping a single group level instead of making Criteria::end() do two different things depending on context.

This adds the ability for authors to add multiple groups to their display Criteria, without interrupting people with nested group() rules that rely on end() to return the form field the rules apply to*

*(as per 306f813 but then reset to previous functionality of always returning the FormField in f124dc8). Ref. #145 & #146