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

feat(table): add table component #99

Merged
merged 1 commit into from
Aug 20, 2020
Merged

feat(table): add table component #99

merged 1 commit into from
Aug 20, 2020

Conversation

LEEHONCN
Copy link
Contributor

affects: @gio-design/components, @gio-design/icons, @gio-design/tokens, website

@azure-pipelines
Copy link

Deploy preview for ready! https://deploy-preview-99--gio-design.surge.sh

@jack0pan jack0pan requested review from huskylengcb, 1eeing, Danny548326 and zzt1224 and removed request for huskylengcb and 1eeing August 14, 2020 08:11
@jack0pan jack0pan self-assigned this Aug 14, 2020
@jack0pan jack0pan added the enhancement New feature or request label Aug 14, 2020
@vercel
Copy link

vercel bot commented Aug 17, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/growingio/gio-design/486zrtk3j
✅ Preview: https://gio-design-git-fork-leehoncn-table.growingio.vercel.app

@azure-pipelines
Copy link

Deploy preview for ready! https://deploy-preview-99--gio-design.surge.sh

@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #99 into master will increase coverage by 2.16%.
The diff coverage is 80.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   63.85%   66.02%   +2.16%     
==========================================
  Files          60       67       +7     
  Lines        1508     1722     +214     
  Branches      405      445      +40     
==========================================
+ Hits          963     1137     +174     
- Misses        542      582      +40     
  Partials        3        3              
Impacted Files Coverage Δ
...components/src/components/table/hook/useSorter.tsx 56.81% <56.81%> (ø)
...ponents/src/components/table/hook/useSelection.tsx 65.62% <65.62%> (ø)
packages/components/src/components/table/Title.tsx 82.85% <82.85%> (ø)
.../components/src/components/table/FilterPopover.tsx 85.71% <85.71%> (ø)
...components/src/components/table/hook/useFilter.tsx 86.20% <86.20%> (ø)
...onents/src/components/table/hook/usePagination.tsx 93.75% <93.75%> (ø)
packages/components/src/components/table/Table.tsx 97.14% <97.14%> (ø)
...omponents/src/components/pagination/Pagination.tsx 82.97% <100.00%> (+2.97%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f7e8a9...e1761e7. Read the comment docs.

@azure-pipelines
Copy link

Deploy preview for ready! ✅ https://deploy-preview-99--gio-design.surge.sh

packages/components/src/components/table/FilterPopover.tsx Outdated Show resolved Hide resolved
data: RecordType[]
): [FilterState<RecordType>[], (filterState: FilterState<RecordType>) => void, RecordType[]] => {
// record all filter states
const [filterStates, setFilterStates] = useState<FilterState<RecordType>[]>(collectFilterStates(columns));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recursion调用可以考虑memo封装

@huskylengcb huskylengcb requested a review from gh2049 August 19, 2020 08:47
affects: @gio-design/components, @gio-design/icons, @gio-design/tokens, website
@azure-pipelines
Copy link

Deploy preview for ready! ✅ https://deploy-preview-99--gio-design.surge.sh

@huskylengcb huskylengcb merged commit bcdd383 into growingio:master Aug 20, 2020
@LEEHONCN LEEHONCN deleted the table branch August 21, 2020 09:40

const { getPrefixCls } = useContext(ConfigContext);
const prefixCls = getPrefixCls('table', customizePrefixCls);
const [activeSorterStates, updateSorterStates, sorttedData] = useSorter(columns, dataSource);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants