The table breaks if there is a date filter
1) with Python executor:
add_result_column(result, 'name', 'name', TYPE_STRING)
add_result_column(result, 'month__filter', 'month__filter', TYPE_DATE)
add_result_column(result, 'section__filter', section__filter', TYPE_STRING)
add_result_row(result, {
'section__filter': 'c',
'month__filter': '2019-01-01',
'name': 'a'
})
2) comment month__filter column both in add column and row sections and the table will be shown.
Are you sure the issue here is the date filter?
Here's an example with a date filter and it seems to work: https://redash-preview.netlify.com/queries/146/source.
@arikfr The column type in your example is Datetime not Date.
I've changed to Date and now it doesn't displayed.
I came here to comment that all of a sudden this no longer works, but now I see your comment which explains why :)
Thank you for helping with reproducing this.
Update: it happens with date time as well. The difference above is in the case of a datetime, it wasn't detected as such (because the SQLite data source returns all columns as strings). If it's detected as a datetime, it will fail the same way.
I ran a few tests on it yesterday, this is caused by Antd Select not supporting data that is not String or Number, so Moment values get this error. I'll try to open a PR for this today. My idea is to use the keys in the Select Options and then translate them on the onChange method by using values[key].
@gabrieldutra the keys idea is interesting.
I took at a stab at it while exploring what's the issue and came up with:
https://github.com/getredash/redash/compare/fix-3836?expand=1
But it has the following flaws:
You're welcome to take it from here :)
Most helpful comment
@gabrieldutra the keys idea is interesting.
I took at a stab at it while exploring what's the issue and came up with:
https://github.com/getredash/redash/compare/fix-3836?expand=1
But it has the following flaws:
You're welcome to take it from here :)