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

三态排序恢复出现数据未展现问题 #37

Open
tufeiping opened this issue Sep 14, 2021 · 0 comments
Open

三态排序恢复出现数据未展现问题 #37

tufeiping opened this issue Sep 14, 2021 · 0 comments

Comments

@tufeiping
Copy link

https://github.com/tinper-bee/bee-table/blob/master/src/lib/sort.js

toggleSortOrder = (order, column) => { let { data, oldData = [], flatColumns } = this.state; let { sort } = this.props; let seleObj; if (!oldData) { oldData = data.concat(); }

这个方法中oldData为空数组,在下方判断
if (!oldData)

不会进入,导入此次数据未备份,排序(三态)还原之后造成表格数据丢失。加入值空及空数组判断。

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

No branches or pull requests

1 participant