-
Notifications
You must be signed in to change notification settings - Fork 31
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
Conversation
Deploy preview for ready! https://deploy-preview-99--gio-design.surge.sh |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/growingio/gio-design/486zrtk3j |
Deploy preview for ready! https://deploy-preview-99--gio-design.surge.sh |
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Deploy preview for ready! ✅ https://deploy-preview-99--gio-design.surge.sh |
data: RecordType[] | ||
): [FilterState<RecordType>[], (filterState: FilterState<RecordType>) => void, RecordType[]] => { | ||
// record all filter states | ||
const [filterStates, setFilterStates] = useState<FilterState<RecordType>[]>(collectFilterStates(columns)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recursion调用可以考虑memo封装
affects: @gio-design/components, @gio-design/icons, @gio-design/tokens, website
Deploy preview for ready! ✅ https://deploy-preview-99--gio-design.surge.sh |
|
||
const { getPrefixCls } = useContext(ConfigContext); | ||
const prefixCls = getPrefixCls('table', customizePrefixCls); | ||
const [activeSorterStates, updateSorterStates, sorttedData] = useSorter(columns, dataSource); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorted
affects: @gio-design/components, @gio-design/icons, @gio-design/tokens, website