Allow to add Module's fields to the search and filter
This commit is contained in:
@ -90,7 +90,11 @@ class SearchString extends Component
|
||||
}
|
||||
|
||||
if (isset($options['relationship'])) {
|
||||
$column .= '.id';
|
||||
if (isset($options['foreign_key'])) {
|
||||
$column .= '.' . $options['foreign_key'];
|
||||
} else {
|
||||
$column .= '.id';
|
||||
}
|
||||
}
|
||||
|
||||
return $column;
|
||||
@ -104,6 +108,10 @@ class SearchString extends Component
|
||||
$column = str_replace('_code', '', $column);
|
||||
}
|
||||
|
||||
if (!empty($options['translation'])) {
|
||||
return $options['translation'];
|
||||
}
|
||||
|
||||
if (!empty($options['key'])) {
|
||||
$column = $options['key'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user