Fix split_by
with date
/datetime
columns
#2545
Merged
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.
Fixes #2544 and fixes #2306.
When
split_by
with a column of type"date"
or"datetime"
, the internal viewport data is returned with column paths helpfully formatted as strings (helpfully due to a legacy internal format which does not properly support mixed types in column paths just yet). However, thecolumn_paths()
methods still returnst_tscalar
, which sometimes is the same as the string representation, but is not when the type is"date"
or"datetime"
. This caused Datagrid column group headers to show up as POSIX timestamps, but also caused the column paths to fail lookup when populating the table itself, causing the column to appears as allnull
.This PR changes the behavior of the
column_paths()
method to explicitlyto_string()
column path values, and adds a test for both thecolumn_paths()
API and a browser integration test for the Datagridsplit_by
with a"date"
columnBefore:
After: