BulkTextarea
BulkTextarea
jsx
import BulkTextarea from '@semcore/bulk-textarea';
<BulkTextarea>
<BulkTextarea.InputField/>
</BulkTextarea>;
InputFieldProps
Name | Type | Description |
---|---|---|
id | string | Unique id |
placeholder | string | Placeholder for field |
value | string | String to render in textarea. OnChanging value, it will go throw paste pipeline |
onBlur | (value: string, e: ) => void | This component doesn't have default onChange callback, because we think that you need only the result after every changes/fixes |
size | "m" | "l" | Size of component |
state | "normal" | "valid" | "invalid" | State for show errors or valid(green) borders |
disabled | boolean | Flag for disabling field |
readonly | boolean | Flag for readonly field |
minRows | number | Min rows |
maxRows | number | Max rows |
validateOn | ("blur" | "blurLine" | "paste")[] | List of available points to validate value |
lineValidation | (line: string, lines: string[]) => {isValid: boolean; errorMessage: string } | Function to validate line |
commonErrorMessage | string | Message for display error about whole field, not only one line |
linesDelimiters | string[] | Delimiters (event.key) for lines |
maxLines | number | Count of max lines in badge |
pasteProps | Paste props | |
lineProcessing | (line: string, lines: string[]) => string | Function for process line after it was blurred |
BulkTextareaProps
Name | Type | Description |
---|---|---|
value | ["value"] | |
onChange | ["onBlur"] | |
placeholder | ["placeholder"] | |
size | ["size"] | |
state | ["state"] | |
disabled | ["disabled"] | |
readonly | ["readonly"] | |
minRows | ["minRows"] | |
maxRows | ["maxRows"] | |
validateOn | ["validateOn"] | |
lineValidation | ["lineValidation"] | |
linesDelimiters | ["linesDelimiters"] | |
pasteProps | ["pasteProps"] | |
maxLines | ["maxLines"] | |
lineProcessing | ["lineProcessing"] | |
errors | ["errors"] | |
showErrors | boolean | |
onErrorsChange | ["onErrorsChange"] | |
onShowErrorsChange | ["onShowErrorsChange"] |