Closed ArmandArthur closed 1 year ago
->add('tags', TextColumn::class, ['label' => 'Tags','field' => 'tag.name','render' => function($value, $context) {
$str = '';
foreach ($context->getTags() as $key => $tag) {
$str .= '<span class="badge badge-phoenix fs--2 badge-phoenix-primary"><span class="badge-label">'.$tag->getName().'</span><span class="ms-1" data-feather="package" style="height:12.8px;width:12.8px;"></span></span>';
}
return $str;
}])
->createAdapter(FetchJoinORMAdapter::class, [
'entity' => Client::class,
'simple_total_query' => false,
'query' => function (QueryBuilder $builder) {
$builder
->select('e')
->addSelect('tag')
->from(Client::class, 'e')
->leftJoin('e.tags', 'tag')
;
},
])
I try this code, it's better.
Example: First item have 2 tags (red, blue) and second item have 2 tags too (red, green)
If no search, both items are display with 2 tags.
If i search "red", both items are display but only red tag is display.
It's possible to display all tags when i search "red"?
Nobody? =P
Stale issue message
Up?
Hi ArmandArthur,
did you succeed ?
CF down