Fix Dash template rendering and minHeight row stretch - #11
Merged
Conversation
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>
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.
Summary
Debugged
usage.pyand fixed package issues that left some DataTable functionality broken or blank.Root cause
Dash was hydrating column
render/editor/footertemplates (and loader / empty-state / sort-icon slots) via_children_props. Those wrappers cannot be safely cloned for per-row{token}interpolation, which produced:renderError: undefined was not found.Fixes
minHeighton 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__.pysrc/lib/components/DataTable.react.jssrc/lib/styles/layers.cssdash_mantine_datatable/dash_mantine_datatable.min.js(+ map)tests/test_fluent_api.pyVerification
dmc.Text("{name}")render, ActionIcon templates, customLoader, and minHeight row height all pass with 0undefined was not founderrorsusage.pyapp: 0 console errors; demos render (sparklines, badges, action icons, filters, loaders)