File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,7 @@ inputReferance = React.createRef()
351351 referance= {inputReferance}
352352 placeholder= ' Type here...'
353353 multiline= {true }
354+ value= {inputValue}
354355 rightButtons= {< Button color= ' white' backgroundColor= ' black' text= ' Send' / > }
355356/ >
356357
@@ -383,7 +384,7 @@ inputClear()
383384| maxlength | none | int | input or textarea maxlength |
384385| onMaxLengthExceed | none | function | called when max length exceed |
385386| autofocus | false | bool | input autofocus |
386-
387+ | value | none | string | input value |
387388## Button Component
388389
389390``` javascript
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ const Input: React.FC<IInputProps> = ({
8282 onKeyDown = { props . onKeyDown }
8383 onKeyPress = { props . onKeyPress }
8484 onKeyUp = { props . onKeyUp }
85+ value = { props . value }
8586 />
8687 ) : (
8788 < textarea
@@ -102,7 +103,7 @@ const Input: React.FC<IInputProps> = ({
102103 onKeyDown = { props . onKeyDown }
103104 onKeyPress = { props . onKeyPress }
104105 onKeyUp = { props . onKeyUp }
105- > </ textarea >
106+ > { props ?. value ?? "" } </ textarea >
106107 ) }
107108 { props . rightButtons && < div className = 'rce-input-buttons' > { props . rightButtons } </ div > }
108109 </ div >
Original file line number Diff line number Diff line change @@ -801,6 +801,7 @@ export interface IInputProps {
801801 placeholder ?: string
802802 defaultValue ?: string
803803 inputStyle ?: Object
804+ value ?: string
804805 onCopy ?: React . ClipboardEventHandler
805806 onCut ?: React . ClipboardEventHandler
806807 onPaste ?: React . ClipboardEventHandler
You can’t perform that action at this time.
0 commit comments