Angular Material: TableRenderer ignores hidden, so rules do not hide an array control
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 88/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
Direzione di ricerca
Leggi packages/angular-material/src/library/other/table.renderer.ts e confronta il relativo template con i template di testo, numero, enum o VerticalLayoutRenderer che associano hidden. Riproduci il problema con lo schema e lo schema UI forniti, iniziando con show: false. Il lavoro è completato quando la tabella è nascosta mentre la regola SHOW è false e diventa visibile quando la condizione è true.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
In the Angular Material renderers, TableRenderer ignores hidden. A SHOW or HIDE rule on a control that the table renderer draws, such as an array of primitives, has no effect: the table stays visible.
TableRenderer extends JsonFormsArrayControl, which sets hidden from the rule's visible state like the other controls. But the template in packages/angular-material/src/library/other/table.renderer.ts never reads it. Other renderers bind it, for example [ngStyle]="{ display: hidden ? 'none' : '' }" in the text, number and enum controls and in VerticalLayoutRenderer.
Expected behavior
The table is hidden while its rule says so, as the other controls are.
Steps to reproduce the issue
-
Render with
angularMaterialRenderers, using this schema and UI schema:{ "type": "object", "properties": { "show": { "type": "boolean" }, "names": { "type": "array", "items": { "type": "string" } } } }{ "type": "VerticalLayout", "elements": [ { "type": "Control", "scope": "#/properties/show" }, { "type": "Control", "scope": "#/properties/names", "rule": { "effect": "SHOW", "condition": { "scope": "#/properties/show", "schema": { "const": true } } } } ] } -
Start with the data
{ "show": false }. -
The
namestable is still shown. A string control with the same rule is hidden.
Which Version of JSON Forms are you using?
v3.8.0 (and master)
Package
Angular Material Renderers
Additional context
Workaround: put the rule on a one-element VerticalLayout around the control. Layouts honour it.
A likely fix: wrap the template's root in @if (!hidden), or bind [ngStyle]="{ display: hidden ? 'none' : '' }" on .table-container, as the other renderers do.
Found while building the web UI of an open-source firewall project; this report was drafted with Claude Code.
- Lingua principale
- TypeScript
- Stelle
- 2.8k
- Fork
- 423
- Merge medio
- 5g 16h
- PR unite (30g)
- 9
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipsesource/jsonforms
-
Add "append" and "prepend" slots for vue-vuetify extended renderersForse già presa @simeyc l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eclipsesource/jsonforms#2668 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eclipsesource/jsonforms#2664 ·
I maintainer di solito rispondono entro 1 giorno
-
core
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eclipsesource/jsonforms#2570 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
eclipsesource/jsonforms#2651 ·
I maintainer di solito rispondono entro 1 giorno
-
angular: propagate the enabled state to detail renderers instead of modifying their UI schemaApertaangular material
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
eclipsesource/jsonforms#2630 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipsesource/jsonforms
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
README の通知条件を実際の判定処理に合わせるForse già presa @unhappychoice l’ha presa oggi. Apertafactory:in-progress priority:medium
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
unhappychoice/oss-issue-opener#395 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug Website
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
OWASP/OWASP-Hunting#88 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno