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

chore: adjust dataIndex def #1096

Merged
merged 3 commits into from
Apr 1, 2024
Merged

chore: adjust dataIndex def #1096

merged 3 commits into from
Apr 1, 2024

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Apr 1, 2024

ref: #1091

Copy link

vercel bot commented Apr 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2024 6:25am

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.96%. Comparing base (99134be) to head (ead70f5).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1096   +/-   ##
=======================================
  Coverage   97.96%   97.96%           
=======================================
  Files          51       51           
  Lines        4671     4671           
  Branches      592      592           
=======================================
  Hits         4576     4576           
  Misses         91       91           
  Partials        4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/interface.ts Outdated
@@ -67,7 +67,7 @@ export interface RenderedCell<RecordType> {

export type Direction = 'ltr' | 'rtl';

export type DataIndex<T = any> = DeepNamePath<T> | '';
export type DataIndex<T = any> = DeepNamePath<T> | (string | {});

Choose a reason for hiding this comment

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

Suggested change
export type DataIndex<T = any> = DeepNamePath<T> | (string | {});
type SpecialString<T extends string> = T | (string & {});
export type DataIndex<T = any> = DeepNamePath<T> | (string | {});

type DataIndex<T = any> = DeepNamePath | SpecialString<DeepNamePath>

@zombieJ zombieJ merged commit b3ff2db into master Apr 1, 2024
11 checks passed
@zombieJ zombieJ deleted the fix-dataindex branch April 1, 2024 06:31
@pfdgithub
Copy link
Contributor

pfdgithub commented Apr 1, 2024

@zombieJ @chenshuai2144
ant Table 的 dataIndex 是支持 string | string[] 的,现在这次修复,仅支持了 string 还是会有类型错误。
#1097

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

Successfully merging this pull request may close these issues.

3 participants