Skip to main content

FeedUpdatesWidget

Interfaces

FeedUpdatesWidgetProps

Extends

  • VirtualScrollerItemProps

Indexable

[p: string]: any

Other Card props

Properties

PropertyTypeDescriptionInherited from
className?stringOverrides or extends the styles applied to the component. Default null-
id?stringId of the feed object Default 'custom_adv'-
message?ReactNodeUpdate message, rendered when no more feed item can be displayed Default <FormattedMessage id="ui.feedUpdatesWidget.message" defaultMessage="ui.feedUpdatesWidget.message" />-
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
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
publicationChannel?stringPublish channel for refresh notification-
subscriptionChannelstringSubscription channel for updates notification-
subscriptionChannelUpdatesCallback?(msg, data) => booleanCallback used to check if the message published to the channel is an update message Default (msg, data) => true-

Functions

FeedUpdatesWidget()

FeedUpdatesWidget(inProps): Element

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

This component allows the subscription to updates from PubSub channel (e.g. websocket) and tell the feed to updates if necessary. Take a look at our demo component here

Import

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

Component Name

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

CSS

Rule NameGlobal classDescription
root.SCFeedUpdatesWidget-rootStyles applied to the root element.
buttonLoadMore.SCFeedUpdatesWidget-button-load-moreStyles applied to the to load more button.

Parameters

ParameterTypeDescription
inPropsFeedUpdatesWidgetProps

Returns

Element


FeedUpdatesWidgetSkeleton()

FeedUpdatesWidgetSkeleton(props): Element

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

Import

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

Component Name

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

CSS

Rule NameGlobal classDescription
root.SCFeedUpdatesWidget-skeleton-rootStyles applied to the root element.
list.SCFeedUpdatesWidget-listStyles applied to the list element.

Parameters

ParameterType
propsany

Returns

Element