mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
12 lines
521 B
TypeScript
12 lines
521 B
TypeScript
|
import { validateVariableSelectionState } from '../state/actions';
|
||
|
import { ThunkResult } from 'app/types';
|
||
|
import { createCustomOptionsFromQuery } from './reducer';
|
||
|
import { toVariablePayload, VariableIdentifier } from '../state/types';
|
||
|
|
||
|
export const updateCustomVariableOptions = (identifier: VariableIdentifier): ThunkResult<void> => {
|
||
|
return async dispatch => {
|
||
|
await dispatch(createCustomOptionsFromQuery(toVariablePayload(identifier)));
|
||
|
await dispatch(validateVariableSelectionState(identifier));
|
||
|
};
|
||
|
};
|