Skip to main content

CommentsFeedObject

Interfaces

CommentsFeedObjectProps

Indexable

[p: string]: any

Other props

Properties

PropertyTypeDescription
cacheStrategy?CacheStrategiesCaching strategies
className?stringOverrides or extends the styles applied to the component. Default null
CommentComponent?(inProps) => ElementCommentComponent component Useful to override the single Comment render component Default CommentObject
CommentComponentProps?CommentObjectPropsProps to spread to CommentObject component Default {variant: 'outlined}
commentObject?SCCommentTypeComment object Default null
commentObjectId?numberId of the comment object Default null
CommentObjectSkeletonProps?anyProps 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?SCCommentsOrderBycomments orderBy Default SCCommentsOrderBy.ADDED_AT_DESC
commentsPageCount?numbercomments per page Default null
feedObject?SCFeedObjectTypeFeed object Default null
feedObjectId?numberId of feed object Default null
feedObjectType?DISCUSSION | POST | STATUSType of feed object Default SCContributionType.POST
id?stringId of the CommentsObject Default comments_object_feedObjectType_feedObjectId
infiniteScrolling?booleanenable/disable infinite scrolling Default true
onChangePage?(page) => anyCallback invoked when load comments page Usefull to sync location path for SEO optimization
page?numberpage Default 1
renderCommentNotFound?() => ElementrenderCommentNotFound function invoked when comment not found Default null
renderNoComments?() => ElementrenderNoComment function invoked when no comments founds Default null
showTitle?booleanshow 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 NameGlobal classDescription
root.SCCommentsFeedObject-rootStyles applied to the root element.
noComments.SCCommentsFeedObject-no-commentsStyles applied to the 'no comments' section.
commentNotFound.SCCommentsFeedObject-comment-not-foundStyles applied to the label 'Comment not found'.

Parameters

ParameterTypeDescription
inPropsCommentsFeedObjectProps

Returns

Element


CommentsFeedObjectSkeleton()

CommentsFeedObjectSkeleton(props): Element

Parameters

ParameterType
propsany

Returns

Element