Skip to content

Commit

Permalink
Add unique keys to WithDialogs wrappers
Browse files Browse the repository at this point in the history
The dialogs.jsx documentation recommends this for a multi-page
application. It does not actually fix our current "disappearing dialogs"
bug, but it's still a good precaution.
  • Loading branch information
martinpitt committed Nov 9, 2023
1 parent cf9e0c7 commit 7cd906d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/networks/networkList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class NetworkList extends React.Component {
const unlocked = superuser.allowed;

return (
<WithDialogs>
<WithDialogs key="network-list">
<Page>
<PageBreadcrumb stickyOnBreakpoint={{ default: "top" }}>
<Breadcrumb variant={PageSectionVariants.light} className='machines-listing-breadcrumb'>
Expand Down
2 changes: 1 addition & 1 deletion src/components/storagePools/storagePoolList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class StoragePoolList extends React.Component {
const actions = (<CreateStoragePoolAction loggedUser={loggedUser} libvirtVersion={libvirtVersion} />);

return (
<WithDialogs>
<WithDialogs key="storage-pool-list">
<Page>
<PageBreadcrumb stickyOnBreakpoint={{ default: "top" }}>
<Breadcrumb className='machines-listing-breadcrumb'>
Expand Down
2 changes: 1 addition & 1 deletion src/components/vm/vmDetailsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const VmDetailsPage = ({

if (cockpit.location.path[1] == "console") {
return (
<WithDialogs>
<WithDialogs key="vm-details">
<Page id={"vm-" + vm.name + "-consoles-page"}
className="consoles-page-expanded">
<PageBreadcrumb stickyOnBreakpoint={{ default: "top" }}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/vms/hostvmslist.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const HostVmsList = ({ vms, config, ui, storagePools, actions, networks, onAddEr
);

return (
<WithDialogs>
<WithDialogs key="vms-list">
<Page>
<PageSection>
<Gallery className="ct-cards-grid" hasGutter>
Expand Down

0 comments on commit 7cd906d

Please sign in to comment.