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:
Gábor Farkas
2021-08-05 14:32:51 +02:00
committed by GitHub
parent 8073be2e4e
commit 9417e86316
10 changed files with 115 additions and 93 deletions

View File

@@ -101,7 +101,7 @@ const SelSingleLoad = ({ loadOptions, allowCustomValue, onChange, onClose }: Sel
const [loadState, doLoad] = useAsyncFn(loadOptions, [loadOptions]);
useEffect(() => {
doLoad();
doLoad('');
}, [doLoad, loadOptions]);
return (

View File

@@ -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';