Focus the current preset when opening the preset overlay

This commit is contained in:
Jordan Eldredge 2019-03-13 21:09:05 -07:00
parent 64127f91e7
commit f26af8d8c5

View file

@ -75,6 +75,12 @@ class PresetOverlay extends React.Component<Props, State> {
// _Also_ ideally we could avoid this prop all together.
this.props.onFocusedKeyDown(this._handleFocusedKeyboardInput)
);
const { currentPresetIndex } = this.props;
if (currentPresetIndex != null) {
this.setState({
selectedListIndex: this._listIndexFromPresetIndex(currentPresetIndex)
});
}
}
componentWillUnmount() {