fix(data_table): resolve blank cells for non-camelCase column keys

Closed
ZA
6mo ago
+183-166

fix(data_table): resolve blank cells for non-camelCase column keys (#6108)


All Submissions:

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Description

When rx.data_table receives data as a runtime Var and columns as a static list of strings, any column key that isn't already fully lowercase renders with blank cells.

This happens because Grid.js infers each column's lookup id by camelCasing the column name string. So a key like "Route" gets inferred as "route", which no longer matches the actual key in the data. Since data is a runtime Var, the keys aren't available at build time, so normalising columns alone can't fix it.

The fix converts each plain column string into the { id, name } object format that Grid.js also supports. When id is set explicitly, Grid.js skips the camelCase inference entirely and uses it directly as the lookup key. This ensures the key always matches regardless of casing. Columns already in object format are left untouched, so this is fully backward-compatible.

Closes #6108