0

我正在调用一个返回 Promise.all 的函数。

applyFilterToSh = (sheet, name, value)=>{
  return sheet.applyFilterAsync(name, value, tableau.FilterUpdateType.REPLACE);
}

applyFilterToSheets = (name, value) => {
  let sheets = this.getActiveSheet().getWorksheets();
  return Promise.all(sheets.map((sheet)=>{
    return this.applyFilterToSh(sheet, name, value);
  }))
}

setDefaultFilters(){
this.applyFilterToSheets(filterValues[0].name, filterValues[0].values[0].formattedValue).then((s)=>{
        this.gFilters.setIsDashboardLoading(false);
        this.gFilters.setAllFilters(this.currentFiltersList);
      })
}

只有当我打开浏览器控制台或关闭它时,才会触发成功回调。`

4

0 回答 0