Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/DTableFiltersPopover/widgets/filter-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ class FilterItem extends React.Component {
this.props.updateFilter(index, newFilter);
};

onSelectCollaborator = (value) => {
onSelectCollaborator = ({ columnOption: collaborator }) => {

@seafile-dev seafile-dev Aug 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[Warning] 缺少协作人过滤回归测试

Why this matters:
本次修复依赖 CollaboratorFilter 传入 { columnOption },此前这里把整个包装对象传给更新函数,导致 collaborator.email 为空。现有测试未覆盖普通协作人列及链接/公式引用协作人列的选择和回显,因此该契约再次变化时会静默回归。

Suggested fix: 为 FilterItem/CollaboratorFilter 添加回归测试,分别模拟两个入口选择 { columnOption: collaborator },断言 updateFilter 收到包含该邮箱的 filter_term,并断言所选协作人会被渲染。

const { index, filter } = this.props;
let newFilter = getUpdatedFilterByCollaborator(filter, value);
let newFilter = getUpdatedFilterByCollaborator(filter, collaborator);
this.resetState(newFilter);
this.props.updateFilter(index, newFilter);
};
Expand Down
Loading