in my form_list.xml i have something like this
<column name="testcolumn" class="Vendor\Module\Model\Block\Source\Testcolumn">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Testcolumn</item>
</item>
</argument>
<settings>
<filter>text</filter>
</settings>
</column>
and in Vendor\Module\Model\Block\Source\Testcolumn i have something like
public function prepareDataSource(array $dataSource)
{
if (isset($dataSource['data']['items'])) {
foreach ($dataSource['data']['items'] as & $item) {
try {
$email = $item['customer'];
$testcolumn_name = $this->customerRepository->get($email)
->getCustomAttribute('$testcolumn_name')->getValue();
}catch (\Exception $e){
$testcolumn_name = '';
}
$item[$this->getData('name')] = $testcolumn_name;
}
}
return $dataSource;
}
is it possible to make filter work for this field ?
Thank you