Add a button to refresh table
This commit is contained in:
parent
8674d25512
commit
9cba9c5f0a
@ -1,4 +1,6 @@
|
||||
import CheckIcon from "@mui/icons-material/Check";
|
||||
import DeleteIcon from "@mui/icons-material/Delete";
|
||||
import RefreshIcon from "@mui/icons-material/Refresh";
|
||||
import {
|
||||
IconButton,
|
||||
Paper,
|
||||
@ -19,7 +21,6 @@ import { useSnackbar } from "../hooks/context_providers/SnackbarProvider";
|
||||
import { AsyncWidget } from "../widgets/AsyncWidget";
|
||||
import { SolarEnergyRouteContainer } from "../widgets/SolarEnergyRouteContainer";
|
||||
import { TimeWidget } from "../widgets/TimeWidget";
|
||||
import CheckIcon from "@mui/icons-material/Check";
|
||||
|
||||
export function PendingDevicesRoute(): React.ReactElement {
|
||||
const loadKey = React.useRef(1);
|
||||
@ -36,7 +37,16 @@ export function PendingDevicesRoute(): React.ReactElement {
|
||||
};
|
||||
|
||||
return (
|
||||
<SolarEnergyRouteContainer label="Pending devices">
|
||||
<SolarEnergyRouteContainer
|
||||
label="Pending devices"
|
||||
actions={
|
||||
<Tooltip title="Refresh table">
|
||||
<IconButton onClick={reload}>
|
||||
<RefreshIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
<AsyncWidget
|
||||
loadKey={loadKey.current}
|
||||
ready={!!pending}
|
||||
|
Loading…
Reference in New Issue
Block a user