mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Transformations: Fix partitionByValues when there is no match (#72981)
This commit is contained in:
parent
1ac9e7eaab
commit
8d79d45972
@ -98,6 +98,11 @@ export function partitionByValues(
|
||||
options?: PartitionByValuesTransformerOptions
|
||||
): DataFrame[] {
|
||||
const keyFields = frame.fields.filter((f) => matcher(f, frame, [frame]))!;
|
||||
|
||||
if (!keyFields.length) {
|
||||
return [frame];
|
||||
}
|
||||
|
||||
const keyFieldsVals = keyFields.map((f) => f.values);
|
||||
const names = keyFields.map((f) => f.name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user