mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 09:05:32 +00:00
Merge pull request #68 from micschk/patch-1
Bugfix: show source tags if not lazyloading
This commit is contained in:
commit
f0b48d12c4
@ -208,16 +208,17 @@ class TagField extends DropdownField
|
||||
|
||||
$values = $this->Value();
|
||||
|
||||
if (!$values) {
|
||||
return $options;
|
||||
// Mark selected tags while still returning a full list of possible options
|
||||
$ids = array(); // empty fallback array for comparing
|
||||
$values = $this->Value();
|
||||
if($values){
|
||||
// @TODO conversion from array to DataList to array...(?)
|
||||
if(is_array($values)) {
|
||||
$values = DataList::create($dataClass)->filter('ID', $values);
|
||||
}
|
||||
$ids = $values->column('ID');
|
||||
}
|
||||
|
||||
if (is_array($values)) {
|
||||
$values = DataList::create($dataClass)->filter('ID', $values);
|
||||
}
|
||||
|
||||
$ids = $values->column('ID');
|
||||
|
||||
$titleField = $this->getTitleField();
|
||||
|
||||
foreach ($source as $object) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user