2018-12-13 16:21:47 +00:00
|
|
|
`TextControlWithAffixes` (component)
|
|
|
|
====================================
|
2018-12-12 20:28:15 +00:00
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
This component is essentially a wrapper (really a reimplementation) around the
|
|
|
|
TextControl component that adds support for affixes, i.e. the ability to display
|
|
|
|
a fixed part either at the beginning or at the end of the text input.
|
2018-12-12 20:28:15 +00:00
|
|
|
|
|
|
|
Props
|
|
|
|
-----
|
|
|
|
|
|
|
|
### `label`
|
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
- Type: String
|
|
|
|
- Default: null
|
2018-12-12 20:28:15 +00:00
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
If this property is added, a label will be generated using label property as the content.
|
2018-12-12 20:28:15 +00:00
|
|
|
|
|
|
|
### `help`
|
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
- Type: String
|
|
|
|
- Default: null
|
2018-12-12 20:28:15 +00:00
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
If this property is added, a help text will be generated using help property as the content.
|
2018-12-12 20:28:15 +00:00
|
|
|
|
|
|
|
### `type`
|
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
- Type: String
|
|
|
|
- Default: `'text'`
|
2018-12-12 20:28:15 +00:00
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
Type of the input element to render. Defaults to "text".
|
2018-12-12 20:28:15 +00:00
|
|
|
|
|
|
|
### `value`
|
|
|
|
|
|
|
|
- **Required**
|
2018-12-13 16:21:47 +00:00
|
|
|
- Type: String
|
|
|
|
- Default: null
|
|
|
|
|
|
|
|
The current value of the input.
|
2018-12-12 20:28:15 +00:00
|
|
|
|
|
|
|
### `className`
|
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
- Type: String
|
|
|
|
- Default: null
|
|
|
|
|
2018-12-12 20:28:15 +00:00
|
|
|
The class that will be added with "components-base-control" to the classes of the wrapper div.
|
|
|
|
If no className is passed only components-base-control is used.
|
|
|
|
|
|
|
|
### `onChange`
|
|
|
|
|
|
|
|
- **Required**
|
2018-12-13 16:21:47 +00:00
|
|
|
- Type: Function
|
|
|
|
- Default: null
|
2018-12-12 20:28:15 +00:00
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
A function that receives the value of the input.
|
2018-12-12 20:28:15 +00:00
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
### `prefix`
|
2018-12-12 20:28:15 +00:00
|
|
|
|
|
|
|
- Type: ReactNode
|
2018-12-13 16:21:47 +00:00
|
|
|
- Default: null
|
|
|
|
|
|
|
|
Markup to be inserted at the beginning of the input.
|
2018-12-12 20:28:15 +00:00
|
|
|
|
|
|
|
### `suffix`
|
|
|
|
|
2018-12-13 16:21:47 +00:00
|
|
|
- Type: ReactNode
|
|
|
|
- Default: null
|
|
|
|
|
2018-12-12 20:28:15 +00:00
|
|
|
Markup to be appended at the end of the input.
|
|
|
|
|