Skip to content

Commit

Permalink
Merge pull request #740 from nickgros/SWC-6668
Browse files Browse the repository at this point in the history
SWC-6668 - Set staleTime for SqlDefinedTableEditorModal
  • Loading branch information
jinjunoh authored Feb 22, 2024
2 parents 39c5a97 + c2c2d2b commit f8eaed6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export default function SqlDefinedTableEditorModal(
data: entity,
isLoading: isEntityLoading,
error: entityError,
} = useGetEntity<MaterializedView | VirtualTable>(entityId)
} = useGetEntity<MaterializedView | VirtualTable>(entityId, undefined, {
// Set the stale time to infinity because we don't want to refetch this in the middle of an edit
staleTime: Infinity,
})
const [sql, setSql] = useState('')

useEffect(() => {
Expand Down

0 comments on commit f8eaed6

Please sign in to comment.