Skip to content

Commit dc2d1e9

Browse files
committed
fix: remove required attribute when click remove button
1 parent 543e5ba commit dc2d1e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Form/Field/HasMany.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ protected function setupScriptForDefaultView($templateScript)
497497
});
498498
499499
$('#has-many-{$this->column}').off('click', '.remove').on('click', '.remove', function () {
500+
$(this).closest('.has-many-{$this->column}-form').find('input').removeAttr('required');
500501
$(this).closest('.has-many-{$this->column}-form').hide();
501502
$(this).closest('.has-many-{$this->column}-form').find('.$removeClass').val(1);
502503
return false;

0 commit comments

Comments
 (0)