react-spectrum
30a5dca5 - docs: fix TableView empty state example dropping TableBody tag (#10233)

Commit
13 days ago
docs: fix TableView empty state example dropping TableBody tag (#10233) The empty state example for S2 TableView had two `- begin highlight -` markers around a single block (one before `<TableBody>` and a second, redundant one inside the opening tag) but only one `- end highlight -`. The code highlighter in `Code.tsx` (`lines()`) starts a new highlight grouping on each `begin` marker and resets the current line, with no guard for an already-open grouping. The second `begin` therefore discarded the already-accumulated `<TableBody` line, so the rendered example (and the StackBlitz/copy/download export, which reads the same rendered code) was missing the `<TableBody>` opening tag, producing invalid JSX. Removing the redundant inner marker leaves the canonical single begin/end pair so the full `<TableBody ... renderEmptyState>` tag renders and the example compiles in StackBlitz. Closes #10231 Co-authored-by: Patrick Wehbe <patrick.wehbe.applications@gmail.com>
Author
Parents
Loading