k2d222 / twwe

Teeworlds collaborative map editor online
GNU Affero General Public License v3.0
13 stars 1 forks source link

Fix search (closed #57) #59

Closed ChillerDragon closed 2 years ago

k2d222 commented 2 years ago

Say I selected 2nd entry in the list and I type another letter in the search box, that would reset the selection to the first entry even tho my selected map is still there.

You could reset the selection only if currently selected is not in the filtered list.

Also, if filter returns an empty list then filteredMaps[0] is undefined and an error is thrown. (Idk what to do in that case but certainly not throw :laughing: )

ChillerDragon commented 2 years ago

Say I selected 2nd entry in the list and I type another letter in the search box, that would reset the selection to the first entry even tho my selected map is still there.

Yea thats what I would expect from a good search. If I am happy with my selection why would I update my search? If I update my search I do want the best hit being selected by default.

k2d222 commented 2 years ago

Hmm true. Doesn't matter that much tbh I'm a bit picky