async onProjectChange()

in src/VariableQueryEditor.tsx [80:92]


    async onProjectChange(projectId: string) {
        let buckets: string[] = [];
        if (!projectId.startsWith('$')) {
            buckets = await this.props.datasource.getLogBuckets(projectId);
        }
        const state: any = {
            buckets,
            projectId,
            bucketId: '',
            viewId: '',
        };
        this.setState(state, () => this.onPropsChange());
    }