# UpsertAnswerComponent

Adds or edits a poll comment. By default it can be opened with the add/update poll comment action.

![Poll Screenshot](@chat-sdk/angular/v7-latest/_assets/poll.png)

![Upsert poll answer Screenshot](@chat-sdk/angular/v7-latest/_assets/upsert-poll-answer.png)

[//]: # "Start of generated content"

## Inputs and outputs

### pollId

**pollId**: `undefined` \| `string`

The poll id to display

#### Inherited from

BasePollComponent.pollId

#### Defined in

[projects/stream-chat-angular/src/lib/polls/base-poll.component.ts:32](https://github.com/GetStream/stream-chat-angular/blob/b8e03ec6da285f5e7c533ce710ebb946cded1190/projects/stream-chat-angular/src/lib/polls/base-poll.component.ts#L32)

---

### messageId

**messageId**: `undefined` \| `string`

The message id the poll is attached to

#### Inherited from

BasePollComponent.messageId

#### Defined in

[projects/stream-chat-angular/src/lib/polls/base-poll.component.ts:36](https://github.com/GetStream/stream-chat-angular/blob/b8e03ec6da285f5e7c533ce710ebb946cded1190/projects/stream-chat-angular/src/lib/polls/base-poll.component.ts#L36)

---

### answer

**answer**: `undefined` \| `PollAnswer`

The poll comment to edit, when in edit mode

#### Defined in

[projects/stream-chat-angular/src/lib/polls/poll-actions/upsert-answer/upsert-answer.component.ts:30](https://github.com/GetStream/stream-chat-angular/blob/b8e03ec6da285f5e7c533ce710ebb946cded1190/projects/stream-chat-angular/src/lib/polls/poll-actions/upsert-answer/upsert-answer.component.ts#L30)

---

### closeModal

**closeModal**: () => `void`

The callback to close the modal the component is displayed in

#### Type declaration

(): `void`

##### Returns

`void`

#### Defined in

[projects/stream-chat-angular/src/lib/polls/poll-actions/upsert-answer/upsert-answer.component.ts:34](https://github.com/GetStream/stream-chat-angular/blob/b8e03ec6da285f5e7c533ce710ebb946cded1190/projects/stream-chat-angular/src/lib/polls/poll-actions/upsert-answer/upsert-answer.component.ts#L34)

[//]: # "End of generated content"


---

This page was last updated at 2026-07-13T13:42:52.872Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/angular/components/UpsertAnswerComponent/](https://getstream.io/chat/docs/sdk/angular/components/UpsertAnswerComponent/).