Fix mount dropdown
This commit is contained in:
@@ -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 = <DropDown changed={props.changed}
|
||||
colSpan={inputColumnSpan}
|
||||
disabled={!props.MState.AllowMount || props.MState.Mounted}
|
||||
items={props.MState.DriveLetters}
|
||||
row={secondRow}
|
||||
rowSpan={7}
|
||||
selected={props.MState.DriveLetters.indexOf(props.PState.MountLocation)}/>;
|
||||
selected={index >= 0 ? props.PState.MountLocation : ''}/>;
|
||||
|
||||
} else {
|
||||
inputColumnSpan = 64;
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user