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: dataSourceList 排序时直接点完成数据源会清空 #90

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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