Padroniza filtros e paginação da seleção de inputs no CRC e TSM (#559)#618
Open
jandsonrj wants to merge 2 commits into
Open
Padroniza filtros e paginação da seleção de inputs no CRC e TSM (#559)#618jandsonrj wants to merge 2 commits into
jandsonrj wants to merge 2 commits into
Conversation
…ination in SpeczData component
2 tasks
crisingulani
requested changes
May 20, 2026
The page-reset effect depended on the "filters" object directly. Since "filters" is recreated on every render (default empty object, or a new object from the parent), the effect ran on every render and called setPage(0), forcing the grid back to page 1 whenever the user navigated. The request for the next page was issued and the backend responded correctly, but the UI snapped back to the first page. Use a serialized key (JSON.stringify) as the effect dependency so it only runs when the search query or filter values actually change.
Member
Author
Valeu pelo apontamento! Achei o bug: o |
crisingulani
approved these changes
May 22, 2026
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.
Padroniza a etapa de seleção de catálogos de redshift nos dois pipelines
(CRC e TSM) e corrige a paginação que estava 100% no front no CRC.
CRC (
/specz_catalogs)getProductsSpeczque o TSMjá usa (params
page,page_size,search,ordering). Antes ocomponente chamava
getAllProductsSpecze baixava a lista inteira deuma vez, o que travava conforme a base cresce
keepNonExistentRowsSelected)pageSizedefault 25, opções 10/25/50TSM (
/training_set_maker)pageSizedefault sobe de 10 pra 25, opções 10/25/50Service
getAllProductsSpecz(sem uso depois da migração)Backend
Nenhuma mudança. O endpoint
/api/products-specz/já aceitavapage,page_size,searcheordering— só faltava o CRC usar.Como testar
docker compose up -dhttp://localhost/specz_catalogs:/api/products-specz/?page=1&page_size=25&ordering=-created_at(não baixa tudo de uma vez)
page=2search=...depois de ~600ms (debounce)continua marcada
http://localhost/training_set_maker:Notas
GridToolbarFilterButtonfiltra apenas as linhas já carregadas napágina atual (limitação nativa do MUI DataGrid com paginação server-side).
Pra busca em toda a base, usar o campo Search.
(múltipla) e TSM com radio (única).