You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rules defined after usage of BaseControl::addFilter() method are dropped and not renderered in HTML #341
If addFilter() method is used BEFORE other rules, they are dropped and passed to HTML. Even documentation states that:
The filter is included between the validation rules and conditions and therefore depends on the order of the methods, i.e. the filter and the rule are called in the same order as is the order of the addFilter() and addRule() methods.
Fix Nette\Forms\Helpers to NOT to exit whole foreach loop, when rule is not exportable.
namespaceNette\Forms;
useNette;
useNette\Utils\Html;
useNette\Utils\Image;
useNette\Utils\Strings;
/** * Forms helpers. */finalclass Helpers
public static function exportRules(Rules$rules): array
{
$payload = [];
foreach ($rulesas$rule) {
if (!$rule->canExport()) {
if ($rule->branch) {
continue;
}
/** * 👇 this is the problem, when replaced * by continue; seems to works, but I am not sure * it doesn't break something else */break;
}
Activity