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

fix(Table): 修复Table组件没有提供expandedRowKeys的绑定会报错的问题(issue #1704) #1705

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

MyZhouGit
Copy link
Contributor

@MyZhouGit MyZhouGit commented Sep 20, 2022

🤔 这个 PR 的性质是?

  • [√ ] 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

📝 更新日志

  • fix(Table): 修复不提供 expandedRowKeys 的绑定会报错

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@MyZhouGit MyZhouGit closed this Sep 20, 2022
@MyZhouGit MyZhouGit reopened this Sep 20, 2022
@MyZhouGit MyZhouGit closed this Sep 20, 2022
@MyZhouGit MyZhouGit reopened this Sep 20, 2022
@PengYYYYY
Copy link
Collaborator

PengYYYYY commented Sep 20, 2022

您好,请补充一下changelog

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2022

完成

@PengYYYYY
Copy link
Collaborator

是这个issue嘛 #1704

@chaishi
Copy link
Collaborator

chaishi commented Sep 20, 2022

具体解决了什么问题,提供一下 issue,或者问题描述

@MyZhouGit
Copy link
Contributor Author

是这个issue嘛 #1704

是的

@PengYYYYY
Copy link
Collaborator

@PengYYYYY PengYYYYY merged commit 1979baf into Tencent:develop Sep 23, 2022
@MyZhouGit MyZhouGit changed the title 解决因为没有提供扩展属性导致出现NPE的错误的问题 fix(Table): 修复Table组件没有提供expandedRowKeys的绑定会报错的问题(issue #1705) Sep 26, 2022
@MyZhouGit MyZhouGit changed the title fix(Table): 修复Table组件没有提供expandedRowKeys的绑定会报错的问题(issue #1705) fix(Table): 修复Table组件没有提供expandedRowKeys的绑定会报错的问题(issue #1704) Sep 26, 2022
@@ -86,7 +86,7 @@ export default function useRowExpand(props: TdPrimaryTableProps, context: SetupC
p: TableExpandedRowParams<TableRowData> & { tableWidth: number; isWidthOverflow: boolean },
) => {
const rowId = get(p.row, props.rowKey || 'id');
if (!tExpandedRowKeys.value.includes(rowId)) return null;
if (tExpandedRowKeys?.value || !tExpandedRowKeys.value.includes(rowId)) return null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

没改对,我接着处理

This was referenced Sep 27, 2022
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