Skip to content

Commit

Permalink
Makes ListInputModal autofocus (#188)
Browse files Browse the repository at this point in the history
* Makes ListInputModal autofocus (#80647)

## About The Pull Request

What it says on the tin. You would have to click on the window and press
enter or make your selections, this just lets you skip the clicking
step.

## Why It's Good For The Game

Just makes it a bit nicer to use these.

<details><summary>No clicking involved</summary>

![oPuiZ3rl3x](https://github.com/tgstation/tgstation/assets/13398309/c5aa70d2-d6a1-4ba8-a64e-805259b0d345)

</details>

## Changelog

:cl:
qol: makes modal list uis autofocus
/:cl:

* Makes ListInputModal autofocus

---------

Co-authored-by: Bloop <[email protected]>
Co-authored-by: NovaBot <[email protected]>
  • Loading branch information
3 people authored and Iajret committed Jan 3, 2024
1 parent 7b0ccb1 commit 898867f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tgui/packages/tgui/interfaces/ListInputModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
KEY_Z,
} from '../../common/keycodes';
import { useBackend, useLocalState } from '../backend';
import { Button, Input, Section, Stack } from '../components';
import { Autofocus, Button, Input, Section, Stack } from '../components';
import { Window } from '../layouts';
import { InputButtons } from './common/InputButtons';
import { Loader } from './common/Loader';
Expand Down Expand Up @@ -196,6 +196,7 @@ const ListDisplay = (props) => {

return (
<Section fill scrollable>
<Autofocus />
{filteredItems.map((item, index) => {
return (
<Button
Expand Down

0 comments on commit 898867f

Please sign in to comment.