TC
Twill CMSsavchuk.ivan

Slows down the page after saving the @formConnectedFields field

Good afternoon I have several roles to which I want to attach the ability to select certain actions (publishing a post, unpublishing, for example). The problem is that after saving, when you click on the checkbox again, the page slows down and crashes with an error that the page is not responding. I also found a problem that if you save a user with a role, for example, an administrator, then the saved field is displayed under the role, for example, a reader (that is, there must be an understanding that the saved fields belong to a particular role). @formField('select', [ 'name' => "role", 'label' => twillTrans('twill::lang.user-management.role'), 'options' => $roleList, 'placeholder' => twillTrans('twill::lang.user-management.role-placeholder'), ]) @formConnectedFields([ 'fieldName' => 'role', 'fieldValues' => ['ADMIN'], 'renderForBlocks' => false, ]) @formField('checkboxes', [ 'name' => 'privilege', 'label' => 'Привилегии', 'inline' => false, 'options' => \App\Domain\Enum\PrivilegeType::values(), ]) @endformConnectedFields @formConnectedFields([ 'fieldName' => 'role', 'fieldValues' => ['READER'], 'renderForBlocks' => false, ]) @formField('checkboxes', [ 'name' => 'privilege', 'label' => 'Привилегии', 'inline' => false, 'options' => \App\Domain\Enum\PrivilegeType::values(), ]) @endformConnectedFields