closing the dialog and using the refresh callback
This commit is contained in:
parent
14126fd7c5
commit
4e60d9bcdb
1 changed files with 5 additions and 1 deletions
|
|
@ -221,6 +221,7 @@ export default function DeviceScannedComponents(props: Props){
|
||||||
deviceAPI.removeAllFoundComponents(device.settings.deviceId)
|
deviceAPI.removeAllFoundComponents(device.settings.deviceId)
|
||||||
.then(resp => {
|
.then(resp => {
|
||||||
console.log("Cleared all scans")
|
console.log("Cleared all scans")
|
||||||
|
refreshCallback()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log("There was a problem clearing scans")
|
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>
|
<DialogContent>This action will clear all scans for this device.</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button variant="contained" onClick={()=>{setClearOpen(false)}}>Close</Button>
|
<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>
|
</DialogActions>
|
||||||
</ResponsiveDialog>
|
</ResponsiveDialog>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue