mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Migrate deprecated ant design APIs
Rename visible to open and use menu instead of overlay in Dropdown as both of these have been removed in the next major version of Antd.
This commit is contained in:
1 parent
2de029b96e
commit
a1c9bc5f9b
12 files changed
+81
-85
No files matched your search
@@ -126,9 +126,9 @@ export default function InstanceViewPage(props) {
|
||||
label: "Delete",
|
||||
});
|
||||
}
|
||||
let instanceButtonsMenu = <Menu
|
||||
items={instanceButtonMenuItems}
|
||||
onClick={({ key }) => {
|
||||
let instanceButtonsMenuProps = {
|
||||
items: instanceButtonMenuItems,
|
||||
onClick: ({ key }) => {
|
||||
if (key === "export") {
|
||||
setExportingData(true);
|
||||
control.sendTo(
|
||||
@@ -167,8 +167,8 @@ export default function InstanceViewPage(props) {
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>;
|
||||
},
|
||||
};
|
||||
let instanceButtons = <Space>
|
||||
{
|
||||
account.hasAnyPermission("core.instance.start", "core.instance.stop")
|
||||
@@ -180,7 +180,7 @@ export default function InstanceViewPage(props) {
|
||||
"core.instance.extract_players",
|
||||
"core.instance.kill",
|
||||
"core.instance.delete",
|
||||
) && <Dropdown placement="bottomRight" trigger={["click"]} overlay={instanceButtonsMenu}>
|
||||
) && <Dropdown placement="bottomRight" trigger={["click"]} menu={instanceButtonsMenuProps}>
|
||||
<Button>More <DownOutlined /></Button>
|
||||
</Dropdown>}
|
||||
</Space>;
|
||||
|
||||
Reference in new issue
Block a user