Update lastSearchTerm when selecting a result