mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Updated "react-use" package to newest version (#37579)
* package.json: updated react-use to newest version * fixes (typescript and other)
This commit is contained in:
@@ -101,7 +101,7 @@ const SelSingleLoad = ({ loadOptions, allowCustomValue, onChange, onClose }: Sel
|
||||
const [loadState, doLoad] = useAsyncFn(loadOptions, [loadOptions]);
|
||||
|
||||
useEffect(() => {
|
||||
doLoad();
|
||||
doLoad('');
|
||||
}, [doLoad, loadOptions]);
|
||||
|
||||
return (
|
||||
|
@@ -10,7 +10,7 @@ import { StreamingClientEditor, RandomWalkEditor } from './components';
|
||||
|
||||
// Types
|
||||
import { TestDataDataSource } from './datasource';
|
||||
import { TestDataQuery, Scenario, NodesQuery, CSVWave, USAQuery } from './types';
|
||||
import { TestDataQuery, NodesQuery, CSVWave, USAQuery } from './types';
|
||||
import { PredictablePulseEditor } from './components/PredictablePulseEditor';
|
||||
import { CSVWavesEditor } from './components/CSVWaveEditor';
|
||||
import { defaultCSVWaveQuery, defaultPulseQuery, defaultQuery } from './constants';
|
||||
@@ -40,7 +40,7 @@ export type Props = QueryEditorProps<TestDataDataSource, TestDataQuery>;
|
||||
export const QueryEditor = ({ query, datasource, onChange, onRunQuery }: Props) => {
|
||||
query = { ...defaultQuery, ...query };
|
||||
|
||||
const { loading, value: scenarioList } = useAsync<Scenario[]>(async () => {
|
||||
const { loading, value: scenarioList } = useAsync(async () => {
|
||||
// migrate manual_entry (unusable since 7, removed in 8)
|
||||
if (query.scenarioId === 'manual_entry' && (query as any).points) {
|
||||
let csvContent = 'Time,Value\n';
|
||||
|
Reference in New Issue
Block a user