Home Reference Source
import {PostWrite} from 'peter-test/app/components/PostWrite.jsx'
public class | source

PostWrite

Extends:

react~Component → PostWrite

Constructor Summary

Public Constructor
public

Component constructor

Member Summary

Public Members
public
public

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

When the post text changed

public
public

handlePost(evt: event): *

Handle send post to the server

public

Romove the image of post

public

Toggle comments of the post to disable/enable

public

Toggle sharing of the post to disable/enable

public
public

state: {"postText": *, "image": *, "imageFullPath": *, "galleryOpen": *, "disabledPost": boolean, "disableComments": *, "disableSharing": *}

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 handleCloseGallery: * source

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

When the post text changed

public handleOpenGallery: * source

public handlePost(evt: event): * source

Handle send post to the server

public handleRemoveImage: * source

Romove the image of post

public handleToggleComments: * source

Toggle comments of the post to disable/enable

public handleToggleSharing: * source

Toggle sharing of the post to disable/enable

public onRequestSetImage: * source

public state: {"postText": *, "image": *, "imageFullPath": *, "galleryOpen": *, "disabledPost": boolean, "disableComments": *, "disableSharing": *} source

Public Methods

public componentWillReceiveProps(nextProps: *) source

Params:

NameTypeAttributeDescription
nextProps *

public render(): react element source

Reneder component DOM

Return:

react element

return the DOM which rendered by component