import React, { Component } from 'react'; import { DataScroller } from '../../components/datascroller/DataScroller'; import { Button } from '../../components/button/Button'; import { Rating } from '../../components/rating/Rating'; import ProductService from '../service/ProductService'; import { AppInlineHeader } from '../../AppInlineHeader'; import './DataScrollerDemo.scss'; import { DataScrollerDoc } from './DataScrollerDoc'; export class DataScrollerDemo extends Component { constructor(props) { super(props); this.state = { products: [] }; this.productService = new ProductService(); this.itemTemplate = this.itemTemplate.bind(this); } componentDidMount() { this.productService.getProducts().then(data => this.setState({ products: data })); } itemTemplate(data) { return (
e.target.src='https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png'} alt={data.name} />
{data.name}
{data.description}
{data.category}
${data.price} {data.inventoryStatus}
); } render() { return (

DataScroller

DataScroller displays data with on demand loading using scroll.

Demo is at the bottom of this page.
); } }