mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-26 03:24:18 +00:00
Focus the current preset when opening the preset overlay
This commit is contained in:
parent
64127f91e7
commit
f26af8d8c5
1 changed files with 6 additions and 0 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue