BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=-1 (i.e., unlimited) cuts off dropdowns after ≈ 100 entries
Summary
Although started with BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=-1
, a customer's instace cut off the reference dropdowns in the edit mode after ≈ 100 entries even though there should be unlimited. What's worse, the manual entering of ids wasn't shown either (i.e., not the behavior of BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=n
and more than n
options available).
Expected Behavior
In case of BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=-1
, all possible entries should be shown in the dropdown, regardless of how long that may take.
Actual Behavior
They're cut off.
Steps to Reproduce the Problem
- Start LinkAhead with
BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=-1
- Create reference prop and fill with ≈ 700 Records of the referenced type (possibly, needs also some 20000 entities in total)
- Try to use that property in edit mode
Specifications
- Version: LinkAhead 0.12.1
- Platform: any
Possible fixes
Probably, the const max_options = parseInt("${BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS}");
doesn't work properly for BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=-1
, or
var entities = datatype !== "FILE" ? edit_mode.query(`FIND Record ${find_entity}&P=0L${max_options}`, true) : [];
var files = edit_mode.query(`FIND File ${find_entity}&P=0L${max_options}`, true);
is problematic in case of max_options = -1
.
Workaround
BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS=9999
or something large enough. This works as expected.