Skip to content

Commit c697cd6

Browse files
authored
Merge pull request #706 from GetStream/poll-ui-bugs
fix: poll composer UI bugs
2 parents 8fe9e8a + 23d61ab commit c697cd6

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

projects/stream-chat-angular/src/lib/polls/poll-composer/poll-composer.component.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,18 @@
8787
<!-- eslint-enable @angular-eslint/template/use-track-by-function -->
8888
<div class="str-chat__drag-and-drop-container__item">
8989
<div class="str-chat__form__input-field">
90-
<input
91-
id="option{{ i }}"
92-
name="option{{ i }}"
93-
type="text"
94-
[formControl]="option"
95-
(input)="optionChanged(i)"
96-
placeholder="{{ 'streamChat.Add an option' | translate }}"
97-
/>
90+
<div class="str-chat__form__input-field__value">
91+
<input
92+
id="option{{ i }}"
93+
name="option{{ i }}"
94+
type="text"
95+
[formControl]="option"
96+
(input)="optionChanged(i)"
97+
placeholder="{{
98+
'streamChat.Add an option' | translate
99+
}}"
100+
/>
101+
</div>
98102
</div>
99103
</div>
100104
</ng-container>

projects/stream-chat-angular/src/lib/polls/poll-composer/poll-composer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class PollComposerComponent {
7979
optionChanged(index: number) {
8080
const control = this.options.at(index);
8181
const penultimateIndex = this.options.length - 2;
82-
if (index === this.options.length - 1 && control.value?.length === 1) {
82+
if (index === this.options.length - 1) {
8383
this.addOption();
8484
} else if (
8585
index === penultimateIndex &&

0 commit comments

Comments
 (0)