Skip to content

Commit

Permalink
lathe search no longer case sensitive (#5889)
Browse files Browse the repository at this point in the history
Co-authored-by: LordME <[email protected]>
  • Loading branch information
silicons and TheLordME authored Aug 24, 2023
1 parent 4fc78d3 commit da86394
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tgui/packages/tgui/interfaces/modules/TGUILatheControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,16 @@ export const TGUILatheControl = (props: TGUILatheControlProps, context) => {
<Stack vertical fill>
<Stack.Item>
<Section>
<Input placeholder="Search (3+ characters)" width="100%" value={searchText} onInput={(e, val) => setSearchText(val)} />
<Input placeholder="Search (3+ characters)"
width="100%" value={searchText} onInput={(e, val) => setSearchText(val.toLowerCase())} />
</Section>
</Stack.Item>
<Stack.Item grow>
<Section fill title="Designs" scrollable>
{
Object.values(data.designs.instances).filter(
(d) => searchText.length > 2? d.name.includes(searchText) : (d.category === category)
(d) => searchText.length > 2
? d.name.toLowerCase().includes(searchText) : (d.category === category)
).sort((d1, d2) =>
d1.name.localeCompare(d2.name)
).map((d) => (
Expand Down

0 comments on commit da86394

Please sign in to comment.