Skip to main content

FeedObject

Interfaces

FeedObjectProps

Extends

  • CardProps.VirtualScrollerItemProps

Indexable

[p: string]: any

Other props

Properties

PropertyTypeDescriptionOverridesInherited from
ActionsProps?ActionsPropsProps to spread to Actions component Default {}--
activitiesExpanded?booleanShow activities as default Default false--
activitiesExpandedType?SCFeedObjectActivitiesTypeActivities type shown initially. If not set, they are shown in order: RELEVANCE_ACTIVITIES, RECENT_COMMENTS If the obj has no comments/activites, or activitiesExpanded == false nothing will be shown--
ActivitiesProps?ActivitiesPropsProps to spread to Activities component Default {}--
cacheStrategy?CacheStrategiesCaching strategies Default CacheStrategies.CACHE_FIRST--
className?stringOverrides or extends the styles applied to the component. Default nullCardProps.className-
CommentComponentProps?CommentObjectPropsProps to spread to CommentObject component Default {variant: 'outlined}--
CommentObjectReplyComponent?(inProps) => ElementCommentObjectReplyComponent component Usefull to override the single CommentObjectReply render component Default CommentObject--
CommentObjectReplyComponentProps?CommentObjectReplyPropsProps to spread to single reply comment object Default {variant: 'outlined'}--
CommentObjectSkeletonProps?anyProps to spread to CommentObject component Default {elevation: 0, variant: 'outlined'}--
ContributionActionsMenuProps?ContributionActionsMenuPropsProps to spread to ContributionActionsMenu component Default {}--
ContributorsFeedObjectProps?ContributorsFeedObjectPropsProps to spread to ContributorsFeedObject component Default {elevation: 0}--
feedObject?SCFeedObjectTypeFeed Object Default null--
feedObjectActivities?any[]Feed Object latest activities Default null--
feedObjectId?numberId of feed object Default null--
FeedObjectMediaPreviewProps?FeedObjectMediaPreviewPropsProps to spread to MediasPreview component Default {}--
FeedObjectSkeletonProps?FeedObjectSkeletonPropsProps to spread to ContributionActionsMenu component Default {elevation: 0}--
feedObjectType?DISCUSSION | POST | STATUSFeed Object type Default 'post'--
FollowButtonProps?FollowPropsProps to spread to Follow button component Default {}--
hideFollowAction?booleanHide follow action object Default false--
hideParticipantsPreview?booleanHide Participants preview Default false--
id?stringId of the feedObject Default feed_object_feedObjectType_feedObjectIdCardProps.id-
markRead?booleanMark the FeedObject as read when enter in viewport Default false--
onHeightChange?() => voidMust be called whenever a list item's height changes (for example, when a user clicks an "Expand"/"Collapse" button of a list item): it re-measures the item's height and updates VirtualScroller layout. Every change in an item's height must come as a result of changing some kind of a state, be it the item's state in VirtualScroller via .onItemStateChange(), or some other state managed by the application. Call this method to re-measure the current element.-VirtualScrollerItemProps.onHeightChange
onReply?(SCCommentType) => voidCallback on reply--
onStateChange?(state) => voidSave current state and when the component re-mount restore previous state using props. It is used to keep a copy of VirtualScroller state so that it could be quickly restored in case the VirtualScroller component gets unmounted and then re-mounted back again — for example, when the user navigates away by clicking on a list item and then navigates "Back" to the list.-VirtualScrollerItemProps.onStateChange
PollObjectProps?PollObjectPropsProps to spread to PollObject component Default {}--
pollVisible?booleanShow poll as default if exist Default false--
summaryExpanded?booleanShow all summary initially (otherwise it will be truncated) Default false--
template?SCFeedObjectTemplateTypeFeed Object template type Default 'preview'--

Functions

FeedObject()

FeedObject(inProps): Element

API documentation for the Community-JS Feed Object component. Learn about the available props and the CSS API.

This component renders a feed object item (post, discussion or status). Take a look at our demo component here

Import

import {FeedObject} from '@selfcommunity/react-ui';

Component Name

The name SCFeedObject can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCFeedObject-rootStyles applied to the root element.
deleted.SCFeedObject-deletedStyles applied to the feed obj when is deleted (visible only for admin and moderator).
header.SCFeedObject-headerStyles applied to the header of the card.
category.SCFeedObject-categoryStyles applied to the category element.
event.SCFeedObject-eventStyles applied to the event element.
group.SCFeedObject-groupStyles applied to the group element.
avatar.SCFeedObject-avatarStyles applied to the avatar element.
username.SCFeedObject-usernameStyles applied to the username element.
activityAt.SCFeedObject-activity-atStyles applied to the activity at section.
tag.SCFeedObject-tagStyles applied to the tag element.
location.SCFeedObject-locationStyles applied to the location element.
content.SCFeedObject-contentStyles applied to the content section. Content section include: title-section, text-section, snippetContent, subContent, medias-section, polls-section, info-section.
error.SCFeedObject-errorStyles applied to the error element.
title-section.SCFeedObject-title-sectionStyles applied to the title section.
title.SCFeedObject-titleStyles applied to the title element.
text-section.SCFeedObject-text-sectionStyles applied to the text section.
text.SCFeedObject-textStyles applied to the text element.
snippet.SCFeedObject-snippetStyles applied to snippet element.
snippet-content.SCFeedObject-snippet-contentStyles applied to snippet content element.
medias-section.SCFeedObject-medias-sectionStyles applied to the medias section.
polls-section.SCFeedObject-polls-sectionStyles applied to the polls section.
info-section.SCFeedObject-info-sectionStyles applied to the info section.
actions-section.SCFeedObject-actions-sectionStyles applied to the actions container.
reply-content.SCFeedObject-reply-contentStyles applied to the reply box.
activitiesSection.SCFeedObject-activities-sectionStyles applied to the activities section element.
activitiesContent.SCFeedObject-activities-contentStyles applied to the activities content element.
followButton.SCFeedObject-follow-buttonStyles applied to the follow button element.

Parameters

ParameterTypeDescription
inPropsFeedObjectProps

Returns

Element


FeedObjectSkeleton()

FeedObjectSkeleton(props): Element

API documentation for the Community-JS Feed Object Skeleton component. Learn about the available props and the CSS API.

Import

import {FeedObjectSkeleton} from '@selfcommunity/react-ui';

Component Name

The name SCFeedObject-skeleton-root can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCFeedObject-skeleton-rootStyles applied to the root element.
media.SCFeedObject-mediaStyles applied to the media element.

Parameters

ParameterType
props{[p: string]: any; template: SCFeedObjectTemplateType; }
props.template?SCFeedObjectTemplateType

Returns

Element