BulkTextarea
BulkTextarea
jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea />BulkTextareaProps
| Name | Type | Description |
|---|---|---|
| value | InputFieldProps<string | string[]>["value"] | The current value |
| onChange | InputFieldProps<string | string[]>["onBlur"] | Callback triggered when the onBlur event is emmited |
| placeholder | InputFieldProps<string | string[]>["placeholder"] | Placeholder text |
| size | InputFieldProps<string | string[]>["size"] | Component size |
| state | InputFieldProps<string | string[]>["state"] | State for show errors or valid(green) borders |
| disabled | InputFieldProps<string | string[]>["disabled"] | Defines whether the textarea is disabled |
| readonly | InputFieldProps<string | string[]>["readonly"] | Defines whether the textarea is readonly |
| minRows | InputFieldProps<string | string[]>["minRows"] | Minimum number of rows to display |
| maxRows | InputFieldProps<string | string[]>["maxRows"] | Maximum number of rows to display |
| validateOn | InputFieldProps<string | string[]>["validateOn"] | An event when a validation occurs |
| lineValidation | InputFieldProps<string | string[]>["lineValidation"] | A function to valide the line |
| linesDelimiters | InputFieldProps<string | string[]>["linesDelimiters"] | Line delimeters |
| pasteProps | InputFieldProps<string | string[]>["pasteProps"] | Defines the props for paste action |
| maxLines | InputFieldProps<string | string[]>["maxLines"] | Maximum number of allowed lines/values |
| lineProcessing | InputFieldProps<string | string[]>["lineProcessing"] | Function to process individual lines during input |
| errors | InputFieldProps<string | string[]>["errors"] | List of errors |
| showErrors | InputFieldProps<string | string[]>["showErrors"] | Defines whether to show errors or not |
BulkTextarea.InputField
jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.InputField />BulkTextareaInputFieldProps
& {...}| Name | Type | Description |
|---|---|---|
| id | string | Unique id |
| placeholder | string | Placeholder for field |
| value | string | string[] | String to render in textarea. OnChanging value, it will go throw paste pipeline |
| onBlur | (value: string | 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. If set empty string, field will not have invalid state. |
| 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 |
BulkTextarea.ErrorsNavigation
jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.ErrorsNavigation />ErrorsNavigationProps
| Name | Type | Description |
|---|---|---|
| errorIndex | number | |
| onPrevError | () => void | |
| onNextError | () => void | |
| errorsCount | number | |
| size | "m" | "l" | |
| showErrors | boolean | |
| getI18nText | ReturnType<typeof useI18n> | |
| disabled | boolean | |
| nextButtonRef | React.RefObject<> | |
| prevButtonRef | React.RefObject<> |
BulkTextarea.ClearAll
ClearAll has the same properties as Button.
jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.ClearAll />BulkTextarea.Counter
jsx
import BulkTextarea from '@semcore/ui/bulk-textarea';
<BulkTextarea.Counter />