Skip to content

Commit

Permalink
Merge pull request #1237 from yaacov/set-loading-when-changing-provider
Browse files Browse the repository at this point in the history
🐞 Set loading when changing provider
  • Loading branch information
yaacov authored Jun 25, 2024
2 parents 4750252 + 562327a commit c92d03f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const ProviderVirtualMachinesList: React.FC<{
});

const [vmData, vmDataLoading] = useInventoryVms({ provider }, providerLoaded, providerLoadError);
const obj = { provider, vmData, vmDataLoading: vmDataLoading || vmData?.length === 0 };
const obj = { provider, vmData, vmDataLoading: vmDataLoading };

return (
<ProviderVirtualMachinesListWrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ export const useProviderInventory = <T>({

// Fetch data from API
useEffect(() => {
setLoading(true);

const fetchData = async () => {
if (disabled) {
return;
Expand Down

0 comments on commit c92d03f

Please sign in to comment.