API Docs for:
Show:

components.CommentForm Class

Defined in: bundle.js:340
Module: filesize

Two mode comment form

When single line mode

  • Enter key submits the value
  • Shift+Enter forces a line break and enables the multiline mode

When in multiline mode:

  • Enter key adds an additional line break
  • Ctrl+Enter submits the value

Constructor

components.CommentForm

(
  • props
)

Defined in bundle.js:340

Parameters:

  • props Object
    • [onSubmit] Function optional

      Called when the form is submitted with the button or the keyboard shortcut

Methods

_submit

() private

Defined in bundle.js:433

Emit onSubmit event with the current textarea value

_submit

() private

Emit onSubmit event with the current textarea value

_submit

() private

Emit onSubmit event with the current textarea value

clear

()

Defined in bundle.js:414

Clear the textarea

clear

()

Clear the textarea

clear

()

Clear the textarea

getValue

() String

Get the textarea value

Returns:

String:

getValue

() String

Get the textarea value

Returns:

String:

getValue

() String

Defined in bundle.js:423

Get the textarea value

Returns:

String:

hasComment

() Boolean

Return true if the textarea has a proper comment

Returns:

Boolean:

hasComment

() Boolean

Return true if the textarea has a proper comment

Returns:

Boolean:

hasComment

() Boolean

Defined in bundle.js:386

Return true if the textarea has a proper comment

Returns:

Boolean:

setBackbone

(
  • attrs
  • cb
)

Like React setState but assumes all values to be Backbone event emitters.

Listens for replace events. The first event argument is assumed to be a replacement event emitter for the given key.

Parameters:

  • attrs Object
  • cb Function