Skip to content

Commit

Permalink
create sample data and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypratap003 committed Jun 6, 2024
1 parent 69653d2 commit 6795a79
Show file tree
Hide file tree
Showing 3 changed files with 619 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard
import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
import { rows, getRandomInteger } from '@patternfly/react-table/dist/esm/demos/sampleData';
import { rows } from '@patternfly/react-core/dist/esm/demos/sampleData';

export const DataListPagination: React.FunctionComponent = () => {
const [page, setPage] = React.useState<number | undefined>(1);
Expand Down Expand Up @@ -129,7 +129,7 @@ export const DataListPagination: React.FunctionComponent = () => {
</Toolbar>
<DataList aria-label="Demo data list">
{paginatedRows.map((row, rowIndex) => {
const { name, threads, applications, workspaces } = row;
const { name, threads, applications, workspaces, lastModified } = row;
return (
<DataListItem aria-labelledby={`Demo-item-${rowIndex}`} key={rowIndex}>
<DataListItemRow>
Expand Down Expand Up @@ -159,7 +159,7 @@ export const DataListPagination: React.FunctionComponent = () => {
<FlexItem>
<CubeIcon /> {workspaces}
</FlexItem>
<FlexItem> Updated {getRandomInteger(1, rowIndex)} days ago</FlexItem>
<FlexItem> Updated {lastModified}</FlexItem>
</Flex>
</FlexItem>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-core/src/demos/DataListDemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/excl
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper';
import { rows, getRandomInteger } from '@patternfly/react-table/dist/esm/demos/sampleData';
import { rows } from '@patternfly/react-core/dist/esm/demos/sampleData';

## Demos

Expand Down
Loading

0 comments on commit 6795a79

Please sign in to comment.