mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
fix(dashboard): Support bigint value in native filters (#32549)
(cherry picked from commit e7721a8c4d)
This commit is contained in:
committed by
Michael S. Molina
parent
bdb9f48044
commit
2f9edd3b0e
@@ -98,6 +98,7 @@ class BigNumberVis extends PureComponent<BigNumberVizProps> {
|
||||
!formatTime ||
|
||||
!showTimestamp ||
|
||||
typeof timestamp === 'string' ||
|
||||
typeof timestamp === 'bigint' ||
|
||||
typeof timestamp === 'boolean'
|
||||
)
|
||||
return null;
|
||||
|
||||
@@ -148,7 +148,7 @@ export default function transformProps(
|
||||
if (!value) {
|
||||
return NULL_STRING;
|
||||
}
|
||||
if (typeof value === 'boolean') {
|
||||
if (typeof value === 'boolean' || typeof value === 'bigint') {
|
||||
return String(value);
|
||||
}
|
||||
return value;
|
||||
|
||||
@@ -183,7 +183,7 @@ export class EchartsChartPlugin<
|
||||
super({
|
||||
...restProps,
|
||||
metadata: new ChartMetadata({
|
||||
parseMethod: 'json',
|
||||
parseMethod: 'json-bigint',
|
||||
...metadata,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -363,7 +363,7 @@ export function formatSeriesName(
|
||||
if (name === undefined || name === null) {
|
||||
return NULL_STRING;
|
||||
}
|
||||
if (typeof name === 'boolean') {
|
||||
if (typeof name === 'boolean' || typeof name === 'bigint') {
|
||||
return name.toString();
|
||||
}
|
||||
if (name instanceof Date || coltype === GenericDataType.Temporal) {
|
||||
|
||||
@@ -125,6 +125,6 @@ test('@superset-ui/plugin-chart-echarts-parsemethod-validation', () => {
|
||||
];
|
||||
|
||||
plugins.forEach(plugin => {
|
||||
expect(plugin.metadata.parseMethod).toEqual('json');
|
||||
expect(plugin.metadata.parseMethod).toEqual('json-bigint');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user