Skip to content

Commit

Permalink
fix running the plugin in grafana 9.5.x and 10.0.x (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor authored Oct 19, 2023
1 parent 4c75a35 commit bda6c46
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/CSVQueryField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ export const CSVQueryField = ({ field, onFieldChange }: Props) => {
return (
<>
<InlineField label="Field" tooltip={`Name of the CSV column to include.`} grow>
<QueryField query={field.name} onChange={onNameChange} portalOrigin="csv" />
<QueryField
query={field.name}
onChange={onNameChange}
portalOrigin="csv"
// https://github.com/grafana/grafana/commit/f6d3a5cc9411acf20c9a8a497c993667aa825062
// auto-adds the `onblur: empty-function` prop,
// but for older grafana versions we need to add this.
// we can remove this when we stop supporting grafana versions before that commit.
onBlur={() => {}}
/>
</InlineField>
<InlineField label="Type" tooltip="Set the type of a field. By default, all fields have type String.">
<Select
Expand Down

0 comments on commit bda6c46

Please sign in to comment.