Skip to content

Conversation

@Zhizhi-2986
Copy link

No description provided.

return context.sort.dataSourceList;
return context.sort.dataSourceList === context.dataSourceList
? context.sort.dataSourceList
: context.dataSourceList;

Choose a reason for hiding this comment

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

这里的问题是不是 当没有发生排序时, context.sort.dataSourceList为空,所以导致了这个问题,那这里应该只是做一个 context.sort.dataSourceList 为空时的兜底逻辑。
你这段代码逻辑是:sort ds === ds 则使用 sort ds, 否则使用 ds。这样不就一直使用 ds了吗

Copy link
Author

Choose a reason for hiding this comment

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

本意是给context.sort.dataSourceList 为空时兜底,当 SAVE_SORT 执行之后也会把 当前ds传给sort.ds,感觉效果是一样的,我改一下

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.

2 participants