FeedUpdatesWidget
Interfaces
FeedUpdatesWidgetProps
Extends
VirtualScrollerItemProps
Indexable
[p
: string
]: any
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
className? | string | Overrides or extends the styles applied to the component. Default null | - |
id? | string | Id of the feed object Default 'custom_adv' | - |
message? | ReactNode | Update message, rendered when no more feed item can be displayed Default <FormattedMessage id="ui.feedUpdatesWidget.message" defaultMessage="ui.feedUpdatesWidget.message" /> | - |
onHeightChange? | () => void | Must 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 : any ) => void | Save 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? | string | Publish channel for refresh notification | - |
subscriptionChannel | string | Subscription channel for updates notification | - |
subscriptionChannelUpdatesCallback? | (msg : any , data : any ) => boolean | Callback used to check if the message published to the channel is an update message Default (msg, data) => true | - |
Functions
FeedUpdatesWidget()
FeedUpdatesWidget(
inProps
):JSX.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 Name | Global class | Description |
---|---|---|
root | .SCFeedUpdatesWidget-root | Styles applied to the root element. |
buttonLoadMore | .SCFeedUpdatesWidget-button-load-more | Styles applied to the to load more button. |
Parameters
Parameter | Type | Description |
---|---|---|
inProps | FeedUpdatesWidgetProps |
Returns
JSX.Element
Source
packages/react-ui/src/components/FeedUpdatesWidget/FeedUpdatesWidget.tsx:92
FeedUpdatesWidgetSkeleton()
FeedUpdatesWidgetSkeleton(
props
):JSX.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 Name | Global class | Description |
---|---|---|
root | .SCFeedUpdatesWidget-skeleton-root | Styles applied to the root element. |
list | .SCFeedUpdatesWidget-list | Styles applied to the list element. |
Parameters
Parameter | Type |
---|---|
props | any |
Returns
JSX.Element
Source
packages/react-ui/src/components/FeedUpdatesWidget/Skeleton.tsx:37