Skip to content

Commit

Permalink
Merge pull request #1562 from hstastna/Menu_button_flickering
Browse files Browse the repository at this point in the history
CNV-33133: Make buttons in VMs and MigrationPolicies pages not blink
  • Loading branch information
openshift-merge-robot authored Sep 22, 2023
2 parents a477473 + 7c35726 commit 2fa1ad8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/views/migrationpolicies/list/MigrationPoliciesList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { FC } from 'react';

import { V1alpha1MigrationPolicy } from '@kubevirt-ui/kubevirt-api/kubevirt';
import { useKubevirtTranslation } from '@kubevirt-utils/hooks/useKubevirtTranslation';
Expand All @@ -21,7 +21,7 @@ type MigrationPoliciesListProps = {
kind: string;
};

const MigrationPoliciesList: React.FC<MigrationPoliciesListProps> = ({ kind }) => {
const MigrationPoliciesList: FC<MigrationPoliciesListProps> = ({ kind }) => {
const { t } = useKubevirtTranslation();
const [mps, loaded, loadError] = useK8sWatchResource<V1alpha1MigrationPolicy[]>({
isList: true,
Expand Down Expand Up @@ -54,10 +54,11 @@ const MigrationPoliciesList: React.FC<MigrationPoliciesListProps> = ({ kind }) =
loaded={loaded}
onFilterChange={onFilterChange}
/>
{isEmpty(mps) && <MigrationPoliciesEmptyState kind={kind} />}
<VirtualizedTable<V1alpha1MigrationPolicy>
columns={activeColumns}
data={data}
EmptyMsg={() => <MigrationPoliciesEmptyState kind={kind} />}
EmptyMsg={() => <></>}
loaded={loaded}
loadError={loadError}
Row={MigrationPoliciesRow}
Expand Down
5 changes: 2 additions & 3 deletions src/views/virtualmachines/list/VirtualMachinesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,8 @@ const VirtualMachinesList: FC<VirtualMachinesListProps> = ({ kind, namespace })
/>
)}
</div>
{isEmpty(vms) && <VirtualMachineEmptyState catalogURL={catalogURL} namespace={namespace} />}
<VirtualizedTable<K8sResourceCommon>
NoDataEmptyMsg={() => (
<VirtualMachineEmptyState catalogURL={catalogURL} namespace={namespace} />
)}
rowData={{
getVmi: (ns: string, name: string) => vmiMapper?.mapper?.[ns]?.[name],
getVmim: (ns: string, name: string) => vmimMapper?.[ns]?.[name],
Expand All @@ -195,6 +193,7 @@ const VirtualMachinesList: FC<VirtualMachinesListProps> = ({ kind, namespace })
data={data}
loaded={loaded && vmiLoaded && vmimsLoaded && isSingleNodeLoaded && !loadingFeatureProxy}
loadError={loadError}
NoDataEmptyMsg={() => <></>}
Row={VirtualMachineRow}
unfilteredData={unfilteredData}
/>
Expand Down

0 comments on commit 2fa1ad8

Please sign in to comment.