fix(AdminServicios): respetar el orden seleccionado por el usuario en Categorías - #81
Open
abdedarghal111 wants to merge 1 commit into
Open
fix(AdminServicios): respetar el orden seleccionado por el usuario en Categorías#81abdedarghal111 wants to merge 1 commit into
abdedarghal111 wants to merge 1 commit into
Conversation
… Categorías El orden fijo pasado a loadData() sobrescribía siempre la selección del desplegable de ordenación, impidiendo cambiar el orden del listado.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
El select de ordenación del listado de Categorías (Administrador > Servicios > Categorías) no funcionaba: al cambiar la opción, el listado no se reordenaba.
La causa era que
AdminServicios::loadData()pasaba siempre un orden fijo (['name' => 'ASC']) a$view->loadData(). ComoListView::loadData()del core solo respeta el orden ya calculado a partir de la selección del usuario cuando el$orderrecibido está vacío, ese valor fijo sobrescribía en cada petición la opción elegida en el desplegable.Se corrige eliminando ese orden fijo, dejando que prevalezca el orden por defecto definido en
addOrderBy()y, tras eso, la selección del usuario.Tarea: https://facturascripts.com/roadmap/4929