Skip to content
Snippets Groups Projects

F fix max dropdown options

Merged Florian Spreckelsen requested to merge f-fix-max-dropdown-options into dev
All threads resolved!
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 4
4
@@ -1893,16 +1893,16 @@ var edit_mode = new function () {
* which can be referenced by the property.
*/
this.retrieve_datatype_list = async function (datatype) {
var find_entity = ["FILE", "REFERENCE"].includes(datatype) ? "" : `"${datatype}"`;
const find_entity = ["FILE", "REFERENCE"].includes(datatype) ? "" : `"${datatype}"`;
const max_options = parseInt("${BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS}"); //for each query; there might be more candidates in total
var query_suffix = max_options != -1 ? `&P=0L${max_options}` : "";
const query_suffix = max_options != -1 ? `&P=0L${max_options}` : "";
if (max_options != -1) {
var n_entities = datatype !== "FILE" ? await edit_mode.query(`COUNT Record ${find_entity}`, true) : 0;
var n_files = await edit_mode.query(`COUNT File ${find_entity}`, true);
}
var entities = datatype !== "FILE" ? edit_mode.query(`FIND Record ${find_entity}${query_suffix}`, true) : [];
var files = edit_mode.query(`FIND File ${find_entity}${query_suffix}`, true);
const entities = datatype !== "FILE" ? edit_mode.query(`FIND Record ${find_entity}${query_suffix}`, true) : [];
const files = edit_mode.query(`FIND File ${find_entity}${query_suffix}`, true);
await Promise.all([entities, files])
Loading