Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ inputReferance = React.createRef()
referance={inputReferance}
placeholder='Type here...'
multiline={true}
value={inputValue}
rightButtons={<Button color='white' backgroundColor='black' text='Send' />}
/>

Expand Down Expand Up @@ -383,7 +384,7 @@ inputClear()
| maxlength | none | int | input or textarea maxlength |
| onMaxLengthExceed | none | function | called when max length exceed |
| autofocus | false | bool | input autofocus |

| value | none | string | input value |
## Button Component

```javascript
Expand Down
3 changes: 2 additions & 1 deletion src/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const Input: React.FC<IInputProps> = ({
onKeyDown={props.onKeyDown}
onKeyPress={props.onKeyPress}
onKeyUp={props.onKeyUp}
value={props.value}
/>
) : (
<textarea
Expand All @@ -102,7 +103,7 @@ const Input: React.FC<IInputProps> = ({
onKeyDown={props.onKeyDown}
onKeyPress={props.onKeyPress}
onKeyUp={props.onKeyUp}
></textarea>
>{props?.value ?? ""}</textarea>
)}
{props.rightButtons && <div className='rce-input-buttons'>{props.rightButtons}</div>}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ export interface IInputProps {
placeholder?: string
defaultValue?: string
inputStyle?: Object
value?: string
onCopy?: React.ClipboardEventHandler
onCut?: React.ClipboardEventHandler
onPaste?: React.ClipboardEventHandler
Expand Down