Skip to content

Latest commit

 

History

History
86 lines (50 loc) · 1.85 KB

RichInputProps.md

File metadata and controls

86 lines (50 loc) · 1.85 KB

APIDocs


Interface: RichInputProps

Props of RichInput.

For other props not mentioned below will be passed to input. defaultValue is omitted for simplicity of logic.

Extends

  • Omit<JSX.IntrinsicElements["input"], "children">

Properties

children?

optional children: Renderer

Render function to create customized view from value.

This function should return ReactNodes which texts are positioned the same as textarea (see examples for detailed usage).

On the rendered nodes, currently limited event handlers will work.

  • onClick
  • onMouseOver
  • onMouseOut
  • onMouseMove
  • onMouseDown
  • onMouseUp

Default Value

undefined

Defined in

src/input.tsx:120


autoHeight?

optional autoHeight: boolean

If true, textarea height is automatically resized and height of style prop does not work. Set maxHeight to style prop if you need limit.

Default Value

undefined

Defined in

src/input.tsx:125


onSelectionChange()?

optional onSelectionChange: (pos) => void

Called when selection in textarea changes. It gives position of caret at the time, which is useful to position menu.

Parameters

pos: CaretPosition

Returns

void

Default Value

undefined

Defined in

src/input.tsx:130