Skip to content

Commit

Permalink
fix(packages): @sa/hooks: fix searchParams of useHookTable
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Sep 8, 2024
1 parent 240ab79 commit cb5bf07
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
}
},
"dependencies": {
"@sa/axios": "workspace:*"
"@sa/axios": "workspace:*",
"@sa/utils": "workspace:^"
}
}
3 changes: 2 additions & 1 deletion packages/hooks/src/use-table.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { computed, reactive, ref } from 'vue';
import type { Ref } from 'vue';
import { jsonClone } from '@sa/utils';
import useBoolean from './use-boolean';
import useLoading from './use-loading';

Expand Down Expand Up @@ -129,7 +130,7 @@ export default function useHookTable<A extends ApiFn, T, C>(config: TableConfig<

/** reset search params */
function resetSearchParams() {
Object.assign(searchParams, apiParams);
Object.assign(searchParams, jsonClone(apiParams));
}

if (immediate) {
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb5bf07

Please sign in to comment.