Skip to content

Commit

Permalink
fix(sort): 修复取消sort不触发刷新的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Jun 7, 2023
1 parent f626670 commit de43d7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/fast-crud/src/use/use-crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ export function useCrud(ctx: UseCrudProps): UseCrudRet {
table: {
onSortChange(sortChange: { isServerSort: boolean; prop: any; asc: any; order: any }) {
const { isServerSort, prop, asc, order } = sortChange;
const oldSort = crudBinding.value.sort;
crudBinding.value.sort = isServerSort ? { prop, order, asc } : null;
if (isServerSort) {
if (isServerSort || oldSort != null) {
expose.doRefresh();
}
}
Expand Down

0 comments on commit de43d7e

Please sign in to comment.