From 1634716bbeb0bb0f55503c4af74f7a6fd7fe2d54 Mon Sep 17 00:00:00 2001
From: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com>
Date: Tue, 28 Jan 2025 13:49:58 +0100
Subject: [PATCH] [ACS-4749] add button is enabled for comment contains only
spaces (#10577)
* [ACS-4749] Disabled add button for comment when comment has only spaces
* [ACS-4749] Unit tests
* [ACS-4749] Removed redundant code
* [ACS-4749] Fixed sonar issue
* [ACS-4749] Resolved issues after rebase
* [ACS-4749] Addressed PR comment
---
.../src/lib/comments/comments.component.html | 8 +-
.../src/lib/comments/comments.component.scss | 11 +-
.../lib/comments/comments.component.spec.ts | 104 ++++++++++++++++--
.../src/lib/comments/comments.component.ts | 36 ++++--
lib/core/src/lib/i18n/en.json | 1 +
5 files changed, 131 insertions(+), 29 deletions(-)
diff --git a/lib/core/src/lib/comments/comments.component.html b/lib/core/src/lib/comments/comments.component.html
index d8252851d3..4a1a69e58b 100644
--- a/lib/core/src/lib/comments/comments.component.html
+++ b/lib/core/src/lib/comments/comments.component.html
@@ -8,22 +8,22 @@
matInput
id="comment-input"
class="adf-text-text-area"
- [placeholder]='"COMMENTS.ADD" | translate'
+ [placeholder]='("COMMENTS.ADD" | translate) + "*"'
[attr.aria-label]="'COMMENTS.ADD' | translate"
- [(ngModel)]="message"
+ [formControl]="commentControl"
(keydown.escape)="clearMessage($event)"
>
+