Skip to content

Commit

Permalink
Merge pull request #110 from GSuma21/sprint-2
Browse files Browse the repository at this point in the history
issue #fix input auto focus
  • Loading branch information
ramkumar-pacewisdom authored Jul 23, 2024
2 parents 08eb656 + 5b3f7e4 commit 29aa51a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export class ProjectDetailsComponent implements OnDestroy, OnInit {
} else {
const dialogRef = this.dialog.open(DialogPopupComponent, {
disableClose: true,
autoFocus : false,
data: {
header: 'SAVE_CHANGES',
content: 'ADD_TITLE_TO_CONTINUE_SAVING',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ <h3 class="text-sm font-bold p-4">{{dialogueData?.content |translate}}</h3>
<div class="flex">
<mat-form-field class="w-full" appearance="outline">
<mat-label>{{ control.label }}</mat-label>
<input matInput id="exampleInput" [(ngModel)]="title" name="{{control.name}}" placeholder="Type here..."
<input matInput id="exampleInput" [(ngModel)]="title" #input="ngModel" name="{{control.name}}" placeholder="Type here..."
[maxlength]="control?.validators.maxLength"
[required]="control?.validators?.required"
[pattern]="control?.validators?.pattern">
</mat-form-field>
</div>
@if(dialogueForm.controls[control.name] && dialogueForm.controls[control.name].errors){
<mat-error class="error-container">
@if(input.touched && dialogueForm.controls[control.name] && dialogueForm.controls[control.name].errors){
<div class="error-message">
<mat-icon class="error-icon" matPrefix>error_outline</mat-icon>
@if(dialogueForm.controls[control.name]?.errors?.['required']){
Expand All @@ -30,10 +30,8 @@ <h3 class="text-sm font-bold p-4">{{dialogueData?.content |translate}}</h3>
<span>{{control.errorMessage.maxLength}}</span>
}
</div>
}
</mat-error>
}


}
}
</form>
Expand Down

0 comments on commit 29aa51a

Please sign in to comment.