I work in NgRx and I receive this error:
'Expected an assignment or function call and instead saw an expression.'
Sonar issue in this.sfForm.get('code')?.[this._mode ? 'disable' : 'enable']();.
I don't understand the message from the Sonar, and what to fix here. I need some help to understand the code and resolve the issue.
<mat-form-field [formGroup]="sfForm">
  <input Input
         matInput
         (keydown.enter)="search($event.target.value)"
         [type]="''"
         formControlName="code"
         required>
</mat-form-field>
sfForm: FormGroup;
private _mode: boolean = true;
      
public set scanMode(value: boolean) {
  this._mode = value;
  this.sfForm.get('code')?.[this._mode ? 'disable' : 'enable']();
}
 
     
     
    