diff --git a/modules/dqt/jsx/react.app.js b/modules/dqt/jsx/react.app.js index 42ed582baf7..7ea88fc3857 100644 --- a/modules/dqt/jsx/react.app.js +++ b/modules/dqt/jsx/react.app.js @@ -682,23 +682,23 @@ class DataQueryApp extends Component { alertSaved: false, loading: false, }); - for (let i = 0; i < fieldsList.length; i++) { - $.ajax({ - url: loris.BaseURL + '/dqt/ajax/datadictionary.php', - success: (data) => { - if (data[0] && data[0].value.IsFile) { - let key = data[0].key[0] + ',' + data[0].key[1]; + $.ajax({ + url: loris.BaseURL + '/dqt/ajax/datadictionary.php', + success: (data) => { + for (let i = 0; i < fieldsList.length; i++) { + if (data[i] && data[i].value.IsFile) { + let key = data[i].key[0] + ',' + data[i].key[1]; let downloadable = this.state.downloadableFields; downloadable[key] = true; this.setState({ downloadableFields: downloadable, }); } - }, - data: {key: fieldsList[i]}, - dataType: 'json', - }); - } + } + }, + data: {keys: JSON.stringify(fieldsList)}, + dataType: 'json', + }); } /**