Home Reference Source
public class | source

Comment

Extends:

react~Component → Comment

Constructor Summary

Public Constructor
public

Component constructor

Member Summary

Public Members
public
public
public

handleCancelEdit(evt: event): *

Handle cancel edit

public

handleDelete(evt: event, id: string, postId: string): *

Delete a comment

public

handleEditComment(evt: event): *

Handle show edit comment

public

handleOnChange(evt: event, data: string): *

When comment text changed

public

handleUpdateComment(evt: event): *

Handle edit comment

public
public

state: {"text": *, "initialText": *, "editDisabled": boolean, "isPostOwner": *}

public

Method Summary

Public Methods
public
public

render(): react element

Reneder component DOM

Public Constructors

public constructor(props: object) source

Component constructor

Params:

NameTypeAttributeDescription
props object

is an object properties of component

Public Members

public divComment: * source

public divCommentRef: * source

public handleCancelEdit(evt: event): * source

Handle cancel edit

public handleDelete(evt: event, id: string, postId: string): * source

Delete a comment

public handleEditComment(evt: event): * source

Handle show edit comment

public handleOnChange(evt: event, data: string): * source

When comment text changed

public handleUpdateComment(evt: event): * source

Handle edit comment

public inputText: * source

public state: {"text": *, "initialText": *, "editDisabled": boolean, "isPostOwner": *} source

public textareaRef: * source

Public Methods

public componentWillMount() source

public render(): react element source

Reneder component DOM

Return:

react element

return the DOM which rendered by component