Skip to content

Fix Dash template rendering and minHeight row stretch - #11

Merged
jeffgallini merged 2 commits into
mainfrom
cursor/fix-dash-component-rendering-7804
Sep 2, 2026
Merged

Fix Dash template rendering and minHeight row stretch#11
jeffgallini merged 2 commits into
mainfrom
cursor/fix-dash-component-rendering-7804

Conversation

@jeffgallini

Copy link
Copy Markdown
Owner

Summary

Debugged usage.py and fixed package issues that left some DataTable functionality broken or blank.

Root cause

Dash was hydrating column render / editor / footer templates (and loader / empty-state / sort-icon slots) via _children_props. Those wrappers cannot be safely cloned for per-row {token} interpolation, which produced:

  • blank cells when the first column had a Dash component render
  • console floods of Error: undefined was not found.

Fixes

  • Keep template slots as dry JSON and let DataTable materialize them (same pattern as the column-filter hotfix)
  • Serialize top-level Component slot props to dry dicts in the Python wrapper so the API still accepts DMC/HTML components
  • Harden React template cloning for any already-hydrated Dash wrappers
  • Apply minHeight on the outer wrapper instead of Mantine DataTable so sparse tables no longer stretch body rows (GitHub issue how to fix row height if the table is set minHeight #8)

Files

  • dash_mantine_datatable/__init__.py
  • src/lib/components/DataTable.react.js
  • src/lib/styles/layers.css
  • dash_mantine_datatable/dash_mantine_datatable.min.js (+ map)
  • tests/test_fluent_api.py

Verification

  • Unit tests: 26 passed
  • Isolated Playwright repros: dmc.Text("{name}") render, ActionIcon templates, customLoader, and minHeight row height all pass with 0 undefined was not found errors
  • Full usage.py app: 0 console errors; demos render (sparklines, badges, action icons, filters, loaders)
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 2, 2026 18:24
Keep column render/editor/footer templates and loader/empty-state/sort-icon
slots as dry JSON so DataTable can materialize them itself. Dash hydration of
those props produced wrappers that broke per-row cloning, blanked cells, and
flooded the console with "undefined was not found".

Also apply minHeight on the outer wrapper instead of Mantine DataTable so
sparse tables no longer stretch body rows to fill leftover vertical space.

Co-authored-by: Jeff <jeffgallini@users.noreply.github.com>
@jeffgallini
jeffgallini merged commit 76d0ea9 into main Sep 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants