File tree Expand file tree Collapse file tree
invenio_requests/assets/semantic-ui/js/invenio_requests/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class TimelineActionEvent extends Component {
5454 < b > { user } </ b >
5555 < Feed . Date >
5656 < TimelineEventBody
57+ collapsible = { false }
5758 payload = { { ...event . payload , content : eventContent } }
5859 /> { " " }
5960 { toRelativeTime ( event . created , i18next . language ) }
Original file line number Diff line number Diff line change @@ -41,23 +41,23 @@ TimelineEventBody.defaultProps = {
4141 expandedByDefault : false ,
4242} ;
4343
44- const TimelineEventBodyRender = ( {
45- ref,
44+ const TimelineEventBodyRender = React . forwardRef ( ( {
4645 refInner,
4746 isOverflowing,
4847 expanded,
4948 collapsible,
5049 toggleCollapsed,
5150 content,
5251 format,
53- } ) => {
52+ files,
53+ } , ref ) => {
5454 const getCollapsibleClass = ( ) => {
5555 if ( ! isOverflowing ) return "" ;
5656 return expanded || ! collapsible ? "expanded" : "overflowing" ;
5757 } ;
5858
5959 return (
60- < span ref = { ref } className = { `collapsible-comment ${ getCollapsibleClass ( ) } ` } >
60+ < span ref = { ref } className = { `${ collapsible ? "collapsible -comment" : "" } ${ getCollapsibleClass ( ) } ` } >
6161 < span ref = { refInner } className = { collapsible ? "collapsible-comment-inner" : "" } >
6262 { format === "html" ? (
6363 < span dangerouslySetInnerHTML = { { __html : content } } />
@@ -76,10 +76,9 @@ const TimelineEventBodyRender = ({
7676 </ span >
7777 </ span >
7878 ) ;
79- } ;
79+ } ) ;
8080
8181TimelineEventBodyRender . propTypes = {
82- ref : PropTypes . instanceOf ( Element ) . isRequired ,
8382 refInner : PropTypes . instanceOf ( Element ) . isRequired ,
8483 isOverflowing : PropTypes . bool . isRequired ,
8584 expanded : PropTypes . bool . isRequired ,
You can’t perform that action at this time.
0 commit comments