fix: use correct table view when switching workspaces (#1447)
Closes #1441
This commit is contained in:
@ -43,9 +43,11 @@ const toViewFieldInput = (
|
||||
export const useTableViewFields = ({
|
||||
objectId,
|
||||
columnDefinitions,
|
||||
skipFetch,
|
||||
}: {
|
||||
objectId: 'company' | 'person';
|
||||
columnDefinitions: ColumnDefinition<ViewFieldMetadata>[];
|
||||
skipFetch?: boolean;
|
||||
}) => {
|
||||
const currentTableViewId = useRecoilScopedValue(
|
||||
currentTableViewIdState,
|
||||
@ -113,7 +115,7 @@ export const useTableViewFields = ({
|
||||
);
|
||||
|
||||
const { refetch } = useGetViewFieldsQuery({
|
||||
skip: !currentTableViewId,
|
||||
skip: !currentTableViewId || skipFetch,
|
||||
variables: {
|
||||
orderBy: { index: SortOrder.Asc },
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user