mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 08:05:43 -06:00
QueryEditor: Add missing keys to extra action components (#39913)
This commit is contained in:
parent
427f75d9b0
commit
d6fd17531d
@ -138,7 +138,7 @@ const getQueryOperationRowStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||
}
|
||||
`,
|
||||
dragIcon: css`
|
||||
cursor: drag;
|
||||
cursor: grab;
|
||||
color: ${theme.colors.textWeak};
|
||||
&:hover {
|
||||
color: ${theme.colors.text};
|
||||
|
@ -100,10 +100,10 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
||||
dashboard: dashboard,
|
||||
refresh: () => {
|
||||
// Old angular editors modify the query model and just call refresh
|
||||
// Important that this use this.props here so that as this fuction is only created on mount and it's
|
||||
// Important that this use this.props here so that as this function is only created on mount and it's
|
||||
// important not to capture old prop functions in this closure
|
||||
|
||||
// the "hide" attribute of the quries can be changed from the "outside",
|
||||
// the "hide" attribute of the queries can be changed from the "outside",
|
||||
// it will be applied to "this.props.query.hide", but not to "query.hide".
|
||||
// so we have to apply it.
|
||||
if (query.hide !== me.props.query.hide) {
|
||||
@ -304,13 +304,14 @@ export class QueryEditorRow<TQuery extends DataQuery> extends PureComponent<Prop
|
||||
|
||||
renderExtraActions = () => {
|
||||
const { query, queries, data, onAddQuery, dataSource } = this.props;
|
||||
return RowActionComponents.getAllExtraRenderAction().map((c) => {
|
||||
return RowActionComponents.getAllExtraRenderAction().map((c, index) => {
|
||||
return React.createElement(c, {
|
||||
query,
|
||||
queries,
|
||||
timeRange: data.timeRange,
|
||||
onAddQuery: onAddQuery as (query: DataQuery) => void,
|
||||
dataSource: dataSource,
|
||||
key: index,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user