Skip to content

Commit

Permalink
Validation scope for create button
Browse files Browse the repository at this point in the history
  • Loading branch information
barton committed Oct 29, 2018
1 parent bdeefd5 commit b227c4b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ public static function register(string $methodName = 'addDynamic')
});

SubmitButton::extensionMethod('addCreateOnClick', function (SubmitButton $_this, bool $allowEmpty = false, $callback = null, array $snippets = []) {
$_this->setValidationScope(false);
$_this->onClick[] = function (SubmitButton $button) use ($allowEmpty, $callback, $snippets) {
/** @var Container $replicator */
$replicator = $button->lookup(__NAMESPACE__ . '\Container');
Expand Down

0 comments on commit b227c4b

Please sign in to comment.