office-ui-fabric-react#List TypeScript Examples
The following examples show how to use
office-ui-fabric-react#List.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: list-feed.tsx From fluent-reader with BSD 3-Clause "New" or "Revised" License | 6 votes |
render() {
return (
this.props.feed.loaded && (
<FocusZone
as="div"
id="refocus"
direction={FocusZoneDirection.vertical}
className={this.getClassName()}
shouldReceiveFocus={this.canFocusChild}
data-is-scrollable>
<List
className={AnimationClassNames.slideUpIn10}
items={this.props.items}
onRenderCell={this.onRenderItem}
ignoreScrollingState
usePageCache
/>
{this.props.feed.loaded && !this.props.feed.allLoaded ? (
<div className="load-more-wrapper">
<PrimaryButton
id="load-more"
text={intl.get("loadMore")}
disabled={this.props.feed.loading}
onClick={() =>
this.props.loadMore(this.props.feed)
}
/>
</div>
) : null}
{this.props.items.length === 0 && (
<div className="empty">{intl.get("article.empty")}</div>
)}
</FocusZone>
)
)
}
Example #2
Source File: list-feed.tsx From fluent-reader with BSD 3-Clause "New" or "Revised" License | 6 votes |
onRenderItem = (item: RSSItem) => {
const props = {
feedId: this.props.feed._id,
key: item._id,
item: item,
source: this.props.sourceMap[item.source],
filter: this.props.filter,
viewConfigs: this.props.viewConfigs,
shortcuts: this.props.shortcuts,
markRead: this.props.markRead,
contextMenu: this.props.contextMenu,
showItem: this.props.showItem,
} as Card.Props
if (
this.props.viewType === ViewType.List &&
this.props.currentItem === item._id
) {
props.selected = true
}
switch (this.props.viewType) {
case ViewType.Magazine:
return <MagazineCard {...props} />
case ViewType.Compact:
return <CompactCard {...props} />
default:
return <ListCard {...props} />
}
}