Error codesLists

Each row of this list must render an element

MARKLESS_KEYED_REPEAT_ROW_CAN_BE_EMPTYerrorMarkless raises it while it builds your .tsrx files.

The message

MARKLESS_KEYED_REPEAT_ROW_CAN_BE_EMPTY: Each row of this @for over <itemName> is one <branchLabel> (<testSource>) with no <value>, so a row whose test fails renders nothing. After the page loads, the browser finds a list’s rows as one element each, so this list would show the rows the server sent and never update.
The browser adds, moves and removes a list’s rows by counting the parent’s child elements, one element per row. A row that renders nothing has no element to count, so the browser cannot tell which rows are which.
Filter the list before the @for instead: `<filter>` and `@for (const <itemName> of shown; ...)`. Or give the @if an @else that renders one element.
https://markless.dev/errors/MARKLESS_KEYED_REPEAT_ROW_CAN_BE_EMPTY

Words in angle brackets change from case to case.

Why

The browser adds, moves and removes a list’s rows by counting the parent’s child elements, one element per row. A row that renders nothing has no element to count, so the browser cannot tell which rows are which.

Fix

Filter the list before the @for instead: `<filter>` and `@for (const <itemName> of shown; ...)`. Or give the @if an @else that renders one element.

Where Markless raises it

All error codes