Skip to content

Commit

Permalink
TGUI input list search fix (#5775)
Browse files Browse the repository at this point in the history
# About the pull request

Fixes the search function of `tgui_input_list`, and also makes the
search bar automatically focus when toggled.
This was caused by the same issue as #5581.

# Explain why it's good for the game

Bugfix, and a little QOL thing.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

('Teleport to Area' menu as an example, but it's the same on any
others.)
**Before:**


https://github.com/cmss13-devs/cmss13/assets/57483089/8450adef-38f4-4ae4-963a-11533a328841

**After:**


https://github.com/cmss13-devs/cmss13/assets/57483089/ede80ffa-7ce6-47c9-9711-a5f29560d1bd

</details>


# Changelog
:cl:
fix: Fixed the search function of TGUI input lists.
qol: Made the TGUI input list search bar automatically focus when
toggled.
/:cl:
  • Loading branch information
SabreML committed Feb 22, 2024
1 parent 1e7703b commit d72106f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tgui/packages/tgui/interfaces/ListInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ export const ListInput = (props) => {
}}
/>
}>
{displayedArray.map((button) => (
{displayedArray.map((button, i) => (
<Button
key={button}
key={i}
fluid
color="transparent"
id={button}
Expand Down Expand Up @@ -161,6 +161,7 @@ export const ListInput = (props) => {
<Stack.Item>
<Input
fluid
autoFocus
onInput={(e, value) =>
setDisplayedArray(
buttons.filter(
Expand Down

0 comments on commit d72106f

Please sign in to comment.