Scanning flag correctly shared from scanning-step container to component.

This commit is contained in:
Evelyn Eastmond committed 2018-07-17 09:51:11 -04:00
1 parent 819868d6a1
commit fe5d72d83a
1 file changed
+5 -1
+5 -1
View File
@@ -32,7 +32,10 @@ class ScanningStep extends React.Component {
'PERIPHERAL_SCAN_TIMEOUT', this.handlePeripheralScanTimeout);
}
handlePeripheralScanTimeout () {
this.setState({scanning: false});
this.setState({
scanning: false,
deviceList: []
});
}
handlePeripheralListUpdate (newList) {
// TODO: sort peripherals by signal strength? so they don't jump around
@@ -58,6 +61,7 @@ class ScanningStep extends React.Component {
onConnected={this.props.onConnected}
onConnecting={this.props.onConnecting}
onRefresh={this.handleRefresh}
scanning={this.state.scanning}
/>
);
}