Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19 do not use grid directly use the original display property of table #20

Closed
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.1.10-alpha.5](https://github.com/acrool/acrool-react-table/compare/v5.1.10-alpha.4...v5.1.10-alpha.5) (2024-12-11)

### [5.1.10-alpha.4](https://github.com/acrool/acrool-react-table/compare/v5.1.10-alpha.3...v5.1.10-alpha.4) (2024-12-11)

### [5.1.10-alpha.3](https://github.com/acrool/acrool-react-table/compare/v5.1.10-alpha.2...v5.1.10-alpha.3) (2024-12-11)

### [5.1.10-alpha.2](https://github.com/acrool/acrool-react-table/compare/v5.1.10-alpha.1...v5.1.10-alpha.2) (2024-12-11)

### [5.1.10-alpha.1](https://github.com/acrool/acrool-react-table/compare/v5.1.10-alpha.0...v5.1.10-alpha.1) (2024-12-11)

### [5.1.10-alpha.0](https://github.com/acrool/acrool-react-table/compare/v5.1.9...v5.1.10-alpha.0) (2024-12-11)

### [5.1.9](https://github.com/acrool/acrool-react-table/compare/v5.1.9-alpha.1...v5.1.9) (2024-12-09)

### [5.1.9-alpha.1](https://github.com/acrool/acrool-react-table/compare/v5.1.9-alpha.0...v5.1.9-alpha.1) (2024-12-09)
Expand Down
20 changes: 10 additions & 10 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"@acrool/js-utils": "^3.2.12",
"@acrool/react-grid": "^5.2.5-alpha.1",
"@acrool/react-table": "link:..",
"@chromatic-com/storybook": "^1.5.0",
"@chromatic-com/storybook": "^3.2.2",
"@emotion/is-prop-valid": "^1.2.2",
"@storybook/addon-essentials": "^8.1.10",
"@storybook/addon-interactions": "^8.1.10",
"@storybook/addon-links": "^8.1.10",
"@storybook/addon-onboarding": "^8.1.10",
"@storybook/blocks": "^8.1.10",
"@storybook/react": "^8.1.10",
"@storybook/react-vite": "^8.1.10",
"@storybook/test": "^8.1.10",
"@storybook/addon-essentials": "^8.4.7",
"@storybook/addon-interactions": "^8.4.7",
"@storybook/addon-links": "^8.4.7",
"@storybook/addon-onboarding": "^8.4.7",
"@storybook/blocks": "^8.4.7",
"@storybook/react": "^8.4.7",
"@storybook/react-vite": "^8.4.7",
"@storybook/test": "^8.4.7",
"@swc/core": "^1.3.68",
"@swc/plugin-styled-components": "^1.5.68",
"@types/dom-to-image": "^2.6.7",
Expand All @@ -37,7 +37,7 @@
"react": "link:../node_modules/react",
"react-dom": "link:../node_modules/react-dom",
"sass": "^1.77.1",
"storybook": "^8.1.10",
"storybook": "^8.4.7",
"storybook-dark-mode": "^4.0.2",
"styled-components": "5.3.9",
"typescript": "^5.2.2",
Expand Down
5 changes: 3 additions & 2 deletions example/src/components/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import {genericsTitleData} from '@acrool/react-table';
import {Avatar, Name} from './Common';
import dayjs from 'dayjs';
import {mockSort} from './utils';
import {ReactNode} from "react";

export interface IPaginateData {
id: number,
name: string,
name: string|ReactNode,
email: string,
role: string,
isJoined: boolean,
Expand All @@ -21,7 +22,7 @@ export const data: IPaginateData[] = [
{id: 1, name: 'Jack Wu', email: 'jackUu@test.com', role: 'Admin', isJoined: true, createdAt: '2022-12-14 00:12:00', avatar: asset('/sample/avatar/female-1.jpg'), amount: 200, subAmount: 300},
{id: 2, name: 'Imagine Chiu', email: 'imagineChiu@test.com', role: 'Guest', isJoined: true, createdAt: '2022-12-15 11:02:00', avatar: asset('/sample/avatar/female-2.jpg'), amount: 99, subAmount: 400},
{id: 3, name: 'Jason Dinwiddie', email: 'jsonDinwiddie@test.com', role: 'Manage', isJoined: false, createdAt: '2022-12-12 12:14:00', avatar: asset('/sample/avatar/female-3.jpg'), amount: 880, subAmount: 200},
{id: 4, name: 'Gloria Lu', email: 'groriaLu@test.com', role: 'Guest', isJoined: true, createdAt: '2022-12-11 10:12:00', avatar: asset('/sample/avatar/female-4.jpg'), amount: 12300, subAmount: 340},
{id: 4, name: <div className="d-flex">Gloria Lu</div>, email: 'groriaLu@test.com', role: 'Guest', isJoined: true, createdAt: '2022-12-11 10:12:00', avatar: asset('/sample/avatar/female-4.jpg'), amount: 12300, subAmount: 340},

{id: 5, name: 'Adam Bolton', email: 'adamBolton@test.com', role: 'Guest', isJoined: false, createdAt: '2022-12-12 12:14:00', avatar: asset('/sample/avatar/female-5.jpg'), amount: 2500, subAmount: 3020},
{id: 6, name: 'Stanley McQueen', email: 'stanleyMcQueen@test.com', role: 'Guest', isJoined: false, createdAt: '2022-12-12 12:14:00', avatar: asset('/sample/avatar/female-6.jpg'), amount: 200, subAmount: 500},
Expand Down
20 changes: 17 additions & 3 deletions example/src/components/primary/Table/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,19 @@ export const WithTitleAlign: Story = {
}
}
};
export const WithDataAlign: Story = {
args: {
title: {
...baseData.title,
name: {text: 'Name', col: 'auto', dataAlign: 'center'},
}
}
};
export const WithFieldCSSClass: Story = {
args: {
title: {
...baseData.title,
name: {text: 'Name', col: 'auto', className: 'justify-content-end'},
name: {text: 'Name', col: 'auto', className: 'text-right'},
}
}
};
Expand Down Expand Up @@ -138,7 +146,7 @@ export const WithSingleStickyLeft: Story = {
style: {maxWidth: '400px', overflow: 'auto'},
title: {
...baseData.title,
id: {...baseData.title.id, col: 100, sticky: 'left'},
id: {...baseData.title.id, col: 50, sticky: 'left'},
}
}
};
Expand Down Expand Up @@ -189,7 +197,7 @@ export const WithBodyColspanField: Story = {
...row.field,
name: {
colSpan: 3,
className: 'justify-content-center',
className: 'text-center',
value: 'Name(ColSpan 3)'
}
}
Expand Down Expand Up @@ -318,3 +326,9 @@ export const WithCell: Story = {
tableCellMediaSize: 1024,
}
};

export const WithHiddenHeader: Story = {
args: {
isVisibleHeader: false,
}
};
Loading