Skip to content

Commit

Permalink
fix(native filters): groupby filter issue (apache#21084)
Browse files Browse the repository at this point in the history
(cherry picked from commit d79b0bf)
  • Loading branch information
stevetracvc authored and Fahrenheit35 committed Nov 11, 2022
1 parent c1e82da commit c88fbc1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function PluginFilterGroupBy(props: PluginFilterGroupByProps) {
}, [JSON.stringify(defaultValue), multiSelect]);

const groupbys = ensureIsArray(formData.groupby).map(getColumnLabel);
const groupby = groupbys[0].length ? groupbys[0] : null;
const groupby = groupbys[0]?.length ? groupbys[0] : null;

const withData = groupby
? data.filter(row => groupby.includes(row.column_name as string))
Expand Down

0 comments on commit c88fbc1

Please sign in to comment.