PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

Update build search field to not run a full file search on each keystroke

Abierto
#2,773 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@Wires77 ya está trabajando en esto.

Desde el 13/5/2021.

enhancement technical
Lenguaje dominante
Lua
Estrellas
5.4k
Forks
2.4k
Merge medio
1 d 12 h
PR fusionados (30 d)
26

Descripción

You can also do it like this to use a changeFunc instead of enterFunc. This does run NewFileSearch for every keypress, though, which obviously can feel a bit more laggy. What you could do here to minimize that lag is instead of having this function call self:BuildList(), it could create the list with all builds, loop through that list in this changeFunc, and build a filtered list that it assigns to self.list for the build list to use.

That latter bit could be a separate PR, but if you could do it here that'd be great. I do think using a changeFunc instead of enterFunc is more consistent with other lists, though.

	self.controls.searchText = new("EditControl", {"TOP",self.anchor,"TOP"}, 0, 25, 640, 20, self.filterBuildList, "Search", "%c%(%)", 100, function(buf)
		main.filterBuildList = buf
		self:BuildList()
	end)

Originally posted by @Wires77 in https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/2546#discussion_r617007653

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.