N°1062 - Portal : autocomplete and search = broken

This commit is contained in:
acognet
2020-03-31 23:47:46 +02:00
parent c6b16bb52e
commit 40efc4cbb1
2 changed files with 7 additions and 12 deletions

View File

@@ -639,14 +639,8 @@ class ObjectController extends BrickController
$oSet = new DBObjectSet($oSearch, array(), array('this' => $oHostObject, 'ac_query' => '%'.$sQuery.'%'));
$oSet->OptimizeColumnLoad(array($oSearch->GetClassAlias() => array('friendlyname')));
// Note : This limit is also used in the field renderer by typeahead to determine how many suggestions to display
if ($oTargetAttDef->GetEditClass() === 'CustomFields')
{
$oSet->SetLimit(static::DEFAULT_LIST_LENGTH);
}
else
{
$oSet->SetLimit($oTargetAttDef->GetMaximumComboLength()); // TODO : Is this the right limit value ? We might want to use another parameter
}
$oSet->SetLimit(static::DEFAULT_LIST_LENGTH);
// - Retrieving objects
while ($oItem = $oSet->Fetch())
{