closing the dialog and using the refresh callback

This commit is contained in:
csawatzky 2025-11-04 15:13:46 -06:00
parent 14126fd7c5
commit 4e60d9bcdb

View file

@ -221,6 +221,7 @@ export default function DeviceScannedComponents(props: Props){
deviceAPI.removeAllFoundComponents(device.settings.deviceId)
.then(resp => {
console.log("Cleared all scans")
refreshCallback()
}).catch(err => {
console.log("There was a problem clearing scans")
})
@ -233,7 +234,10 @@ export default function DeviceScannedComponents(props: Props){
<DialogContent>This action will clear all scans for this device.</DialogContent>
<DialogActions>
<Button variant="contained" onClick={()=>{setClearOpen(false)}}>Close</Button>
<Button variant="contained" color="primary" onClick={()=>{removeAllScans()}}>Continue</Button>
<Button variant="contained" color="primary" onClick={()=>{
removeAllScans()
setClearOpen(false)
}}>Continue</Button>
</DialogActions>
</ResponsiveDialog>
)