grafana/public/app/features/variables/custom/actions.ts
Torkel Ödegaard 1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00

12 lines
523 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));
};
};