You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now you can easily get Ref of underlying textarea.
The other approach is to access to `this.rtaRef.textareaRef` but `innerRef={(ref) => {this.textareaRef = ref}}` is now preffered.
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,12 +34,13 @@ or there is UMD build available. [Check out this pen as example](https://codepen
34
34
35
35
## Props
36
36
37
-
*Note: Every other props than the mentioned below will be propagated to textarea itself*
37
+
> *☝️ Note: Every other props than the mentioned below will be propagated to the textarea itself*
38
38
39
39
| Props | Type | Description
40
40
| :------------- | :------------- | ---------
41
41
| **trigger*** | Object: Trigger type | Define triggers and their corresponding behavior
42
42
| **loadingComponent*** | React Component | Gets `data` props which is already fetched (and displayed) suggestion
43
+
| innerRef | Function: (HTMLTextAreaElement) => void) | Allows you to get React ref of the underlying textarea
43
44
| minChar | Number | Number of characters that user should type for trigger a suggestion. Defaults to 1.
44
45
| onCaretPositionChange | Function: (number) => void | Listener called every time the textarea's caret position is changed. The listener is called with one attribute - caret position denoted by an integer number.
45
46
| closeOnClickOutside | boolean | When it's true autocomplete will close when use click outside. Defaults to false.
0 commit comments