CommentsFeedObject
Interfaces
CommentsFeedObjectProps
Indexable
[p: string]: any
Other props
Properties
| Property | Type | Description | 
|---|---|---|
| cacheStrategy? | CacheStrategies | Caching strategies | 
| className? | string | Overrides or extends the styles applied to the component. Default null | 
| CommentComponent? | ( inProps) =>Element | CommentComponent component Useful to override the single Comment render component Default CommentObject | 
| CommentComponentProps? | CommentObjectProps | Props to spread to CommentObject component Default {variant: 'outlined} | 
| commentObject? | SCCommentType | Comment object Default null | 
| commentObjectId? | number | Id of the comment object Default null | 
| CommentObjectSkeletonProps? | any | Props to spread to CommentObject component Default {elevation: 0, variant: 'outlined'} | 
| comments? | SCCommentType[] | additional comments to show in the header/footer useful when from a feedObject publish a comment Default [] | 
| commentsOrderBy? | SCCommentsOrderBy | comments orderBy Default SCCommentsOrderBy.ADDED_AT_DESC | 
| commentsPageCount? | number | comments per page Default null | 
| feedObject? | SCFeedObjectType | Feed object Default null | 
| feedObjectId? | number | Id of feed object Default null | 
| feedObjectType? | DISCUSSION|POST|STATUS | Type of feed object Default SCContributionType.POST | 
| id? | string | Id of the CommentsObject Default comments_object_feedObjectType_feedObjectId | 
| infiniteScrolling? | boolean | enable/disable infinite scrolling Default true | 
| onChangePage? | ( page) =>any | Callback invoked when load comments page Usefull to sync location path for SEO optimization | 
| page? | number | page Default 1 | 
| renderCommentNotFound? | () => Element | renderCommentNotFound function invoked when comment not found Default null | 
| renderNoComments? | () => Element | renderNoComment function invoked when no comments founds Default null | 
| showTitle? | boolean | show title (number of comments) | 
Functions
CommentsFeedObject()
CommentsFeedObject(
inProps):Element
API documentation for the Community-JS Comments Feed Object component. Learn about the available props and the CSS API.
This component renders a list of comment items. Take a look at our demo component here
Import
import {CommentsFeedObject} from '@selfcommunity/react-ui';
Component Name
The name SCCommentsFeedObject can be used when providing style overrides in the theme.
CSS
| Rule Name | Global class | Description | 
|---|---|---|
| root | .SCCommentsFeedObject-root | Styles applied to the root element. | 
| noComments | .SCCommentsFeedObject-no-comments | Styles applied to the 'no comments' section. | 
| commentNotFound | .SCCommentsFeedObject-comment-not-found | Styles applied to the label 'Comment not found'. | 
Parameters
| Parameter | Type | Description | 
|---|---|---|
| inProps | CommentsFeedObjectProps | 
Returns
Element
CommentsFeedObjectSkeleton()
CommentsFeedObjectSkeleton(
props):Element
Parameters
| Parameter | Type | 
|---|---|
| props | any | 
Returns
Element