Skip to content

Commit 16646e8

Browse files
author
Muhammad Musfir
committed
chore(fix): adds json stringify support for BigInt in SelectFilterPlugin
1 parent a5c7ba6 commit 16646e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,13 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
376376
const prev = prevDataRef.current;
377377
const curr = data;
378378

379+
const stringifySafe = (val: unknown) =>
380+
typeof val === 'bigint' ? val.toString() : val;
381+
379382
const hasDataChanged =
380383
prev?.length !== curr?.length ||
381-
JSON.stringify(prev?.map(row => row[col])) !==
382-
JSON.stringify(curr?.map(row => row[col]));
384+
JSON.stringify(prev?.map(row => stringifySafe(row[col]))) !==
385+
JSON.stringify(curr?.map(row => stringifySafe(row[col])));
383386

384387
// If data actually changed (e.g., due to parent filter), reset flag
385388
if (hasDataChanged) {

0 commit comments

Comments
 (0)