The inventory search returns to the previous query
When you search something, close your inventory and the reopen it; what you search the last time has been replaced with the previous search.
Example: Search leaf and then gold, close your inventory and if you reopen it, you will see 'leaf' in the search bar.