-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: wrap groupBy single-select value in an array #1000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question
@@ -340,9 +340,9 @@ export function GroupByVariableRenderer({ model }: SceneComponentProps<MultiValu | |||
} | |||
return; | |||
} | |||
if (newValue?.value) { | |||
if (newValue?.value && newValue?.label) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think you want this extra condition. label is optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe something like:
if (newValue?.value) {
setUncommittedValue([newValue]);
model.changeValueTo([newValue.value], newValue.label ? [newValue.label] : undefined);
}
would work then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
🚀 PR was released in |
When trying to use the Single select in db-o11y, realized we were sending incorrect data format.
"error": "json: cannot unmarshal string into Go struct field internalQueryModel.groupByKeys of type []string",
In this PR I'm wrapping the value in an array.