swarm-game / swarm

Resource gathering + programming game
Other
838 stars 52 forks source link

Fuzzy search query is carried over to other menu #1967

Closed nitinprakash96 closed 4 months ago

nitinprakash96 commented 4 months ago

Doing a fuzzy search over the inventory list and then switching over to different scenario also carries over the search string. Here's a small clip demonstrating this behavior:

https://github.com/swarm-game/swarm/assets/15181803/61e05bbf-7062-43d3-a74c-2549f03d2867

byorgey commented 4 months ago

Ah, good catch! We need to reset uiInventorySearch to Nothing in scenarioToUIState:

https://github.com/swarm-game/swarm/blob/eb156a688fba5f60d7a8b55c2f4505fa022f6a17/src/swarm-tui/Swarm/TUI/Model/StateUpdate.hs#L259