DiscussionComposer
Extends:
The DiscussionComposer component displays the composer content for starting
a new discussion. It adds a text field as a header control so the user can
enter the title of their discussion. It also overrides the submit and
willExit actions to account for the title.
Attrs
- All of the attrs for ComposerBody
titlePlaceholder
Static Method Summary
| Static Public Methods | ||
| public static |
initAttrs(attrs: *) |
|
Member Summary
| Public Members | ||
| public |
|
|
| public |
The value of the title input. |
|
Method Summary
| Public Methods | ||
| public |
Get the data to submit to the server when the discussion is saved. |
|
| public |
hasChanges(): * |
|
| public |
headerItems(): * |
|
| public |
oninit(vnode: *) |
|
| public |
onkeydown(e: Event) Handle the title input's keydown event. When the return key is pressed, move the focus to the start of the text editor. |
|
| public |
onsubmit() |
|
Inherited Summary
| From class ComposerBody | ||
| public |
composer: * |
|
| public |
Whether or not the component is loading. |
|
| public |
hasChanges(): String Check if there is any unsaved data. |
|
| public |
Build an item list for the composer's header. |
|
| public |
loaded() Stop loading. |
|
| public |
oninit(vnode: *) |
|
| public abstract |
onsubmit() Handle the submit event of the text editor. |
|
| public |
view(): * |
|
Static Public Methods
public static initAttrs(attrs: *) source
Params:
| Name | Type | Attribute | Description |
| attrs | * |
Public Members
public loading: boolean source
Whether or not the component is loading.
Override:
ComposerBody#loadingPublic Methods
public hasChanges(): * source
Check if there is any unsaved data.
Override:
ComposerBody#hasChangesReturn:
| * |
public headerItems(): * source
Build an item list for the composer's header.
Override:
ComposerBody#headerItemsReturn:
| * |
public oninit(vnode: *) source
Override:
ComposerBody#oninitParams:
| Name | Type | Attribute | Description |
| vnode | * |
public onkeydown(e: Event) source
Handle the title input's keydown event. When the return key is pressed, move the focus to the start of the text editor.
Params:
| Name | Type | Attribute | Description |
| e | Event |
Reference
Source
