fix: use correct table view when switching workspaces (#1447)
Closes #1441
This commit is contained in:
@ -22,10 +22,12 @@ export const useViewSorts = <SortField>({
|
||||
availableSorts,
|
||||
currentViewId,
|
||||
scopeContext,
|
||||
skipFetch,
|
||||
}: {
|
||||
availableSorts: SortType<SortField>[];
|
||||
currentViewId: string | undefined;
|
||||
scopeContext: Context<string | null>;
|
||||
skipFetch?: boolean;
|
||||
}) => {
|
||||
const [sorts, setSorts] = useRecoilScopedState(
|
||||
sortsScopedState,
|
||||
@ -39,7 +41,7 @@ export const useViewSorts = <SortField>({
|
||||
);
|
||||
|
||||
const { refetch } = useGetViewSortsQuery({
|
||||
skip: !currentViewId,
|
||||
skip: !currentViewId || skipFetch,
|
||||
variables: {
|
||||
where: {
|
||||
viewId: { equals: currentViewId },
|
||||
|
||||
Reference in New Issue
Block a user