diff --git a/README.md b/README.md index 9675ce7b..39120fd3 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ import { MessageBox } from 'react-chat-elements' | onLoad | none | function | message on load photo | | onTitleClick | none | function | message title on click event | | onForwardClick | none | function | message forward on click event | +| onContextMenu | none | function | message contextmenu click event | | forwarded | none | boolean | message forward icon | | status | none | string | message status info (waiting, sent, received, read) | | notch | true | boolean | message box notch | @@ -200,7 +201,7 @@ import { MessageList } from 'react-chat-elements' | downButton | true | boolean | message list scroll to bottom button | | downButtonBadge | none | boolean | message list downButton badge content | | onDownButtonClick | none | function | message list onDownButtonClick | - +| onContextMenu | none | function | message list item onContextMenu event, gets 3 parameters: message item, index of item, event | ## ChatList Component diff --git a/package.json b/package.json index 7cfb58a3..a5b76bef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-chat-elements", - "version": "10.1.1", + "version": "10.1.2", "description": "Reactjs chat components", "author": "Avare Kodcu ", "main": "dist/main.js", diff --git a/src/MessageBox/MessageBox.js b/src/MessageBox/MessageBox.js index c8efe69c..e3f6cf8b 100644 --- a/src/MessageBox/MessageBox.js +++ b/src/MessageBox/MessageBox.js @@ -50,7 +50,9 @@ export class MessageBox extends Component { {'rce-mbox--clear-padding': thatAbsoluteTime}, {'rce-mbox--clear-notch': !this.props.notch} )}> -
+
{ this.props.forwarded === true &&
this.onDownload(x, i, e))} onTitleClick={this.props.onDownload && ((e) => this.onTitleClick(x, i, e))} onForwardClick={this.props.onForwardClick && ((e) => this.onForwardClick(x, i, e))} - onClick={this.props.onClick && ((e) => this.onClick(x, i, e))}/> + onClick={this.props.onClick && ((e) => this.onClick(x, i, e))} + onContextMenu={this.props.onContextMenu && ((e) => this.onContextMenu(x, i, e))} + /> )) }