CommentsFeedObject
Interfaces
CommentsFeedObjectProps
Indexable
[p
: string
]: any
Properties
Property | Type | Description |
---|---|---|
CommentComponent? | (inProps : CommentObjectProps ) => Element | CommentComponent component Useful to override the single Comment render component Default CommentObject |
CommentComponentProps? | CommentObjectProps | Props to spread to CommentObject component Default {variant: 'outlined} |
CommentObjectSkeletonProps? | any | Props to spread to CommentObject component Default {elevation: 0, variant: 'outlined'} |
cacheStrategy? | CacheStrategies | Caching strategies |
className? | string | Overrides or extends the styles applied to the component. Default null |
commentObject? | SCCommentType | Comment object Default null |
commentObjectId? | number | Id of the comment object Default null |
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 | feedObject.id> |
infiniteScrolling? | boolean | enable/disable infinite scrolling Default true |
onChangePage? | (page : any ) => 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
):JSX.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
JSX.Element
Source
packages/react-ui/src/components/CommentsFeedObject/CommentsFeedObject.tsx:189
CommentsFeedObjectSkeleton()
CommentsFeedObjectSkeleton(
props
):JSX.Element
Parameters
Parameter | Type |
---|---|
props | any |
Returns
JSX.Element
Source
packages/react-ui/src/components/CommentsFeedObject/Skeleton.tsx:15