diff --git a/src/components/MountItem/MountItem.js b/src/components/MountItem/MountItem.js index faf36ce..8e41394 100644 --- a/src/components/MountItem/MountItem.js +++ b/src/components/MountItem/MountItem.js @@ -67,13 +67,14 @@ export default connect(mapStateToProps, mapDispatchToProps)(props => { let inputControls = null; if (props.Platform === 'win32') { inputColumnSpan = 20; + const index = props.MState.DriveLetters.indexOf(props.PState.MountLocation); inputControls = ; + selected={index >= 0 ? props.PState.MountLocation : ''}/>; } else { inputColumnSpan = 64; diff --git a/src/containers/MountItems/MountItems.js b/src/containers/MountItems/MountItems.js index 06fff27..88aefcc 100644 --- a/src/containers/MountItems/MountItems.js +++ b/src/containers/MountItems/MountItems.js @@ -128,14 +128,10 @@ class MountItems extends IPCContainer { } }; - handleMountLocationChanged = (provider, value) => { - const location = (this.props.Platform === 'win32') ? - this.props.MountState[provider].DriveLetters[value] : - value; - + handleMountLocationChanged = (provider, mountLocation) => { const state = { ...this.props.ProviderState[provider], - MountLocation: location, + MountLocation: mountLocation, }; this.props.setProviderState(provider, state); };