Adiciona filtro "Official products" na seleção de inputs dos pipelines (#472)#619
Open
jandsonrj wants to merge 3 commits into
Open
Adiciona filtro "Official products" na seleção de inputs dos pipelines (#472)#619jandsonrj wants to merge 3 commits into
jandsonrj wants to merge 3 commits into
Conversation
…ination in SpeczData component
…nce UI with alerts and clear selection functionality
1 task
crisingulani
approved these 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.
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.
O que muda
Adiciona um checkbox "Official products" ao lado do Search nas etapas de
seleção de catálogos do CRC (
/specz_catalogs) e do TSM(
/training_set_maker). Quando marcado, a listagem filtra para mostrarapenas produtos oficiais. Desmarcado, mostra todos (default).
Também coloquei um alerta visual em cima do data grid para deixar claro
quando há seleções fora da view atual (escondidas por filtro ou em outra
página da paginação), com botão "Clear all" / "Clear" para resetar
rapidamente. Isso evita o caso de submeter o pipeline com itens que o
usuário esqueceu que estavam selecionados.
Backend
Nenhuma mudança. O endpoint
/api/products-specz/já aceita o filtroofficial_productviaProductFilter(mesmo filtro usado em/oficial_products).Como testar
Em
/specz_catalogs:?official_product=true)amarelo informando quantos itens estão ocultos
Em
/training_set_maker: mesmo comportamento, adaptado para seleçãoúnica (alerta avisa se o catálogo selecionado está oculto pelo filtro)