mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Don't pass labelfield as value for SEarchableDropdownField (#11303)
This commit is contained in:
parent
dbc0288038
commit
0bb88d0988
@ -2507,7 +2507,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
$list = DataList::create(static::class);
|
$list = DataList::create(static::class);
|
||||||
$threshold = DBForeignKey::config()->get('dropdown_field_threshold');
|
$threshold = DBForeignKey::config()->get('dropdown_field_threshold');
|
||||||
$overThreshold = $list->count() > $threshold;
|
$overThreshold = $list->count() > $threshold;
|
||||||
$field = SearchableDropdownField::create($fieldName, $fieldTitle, $list, $labelField)
|
$field = SearchableDropdownField::create($fieldName, $fieldTitle, $list, $ownerRecord->{$relationName . 'ID'}, $labelField)
|
||||||
->setIsLazyLoaded($overThreshold)
|
->setIsLazyLoaded($overThreshold)
|
||||||
->setLazyLoadLimit($threshold);
|
->setLazyLoadLimit($threshold);
|
||||||
return $field;
|
return $field;
|
||||||
|
Loading…
Reference in New Issue
Block a user