modles/custom/you_module/you_module.module
/**
* Views Exposed form.
*
* @param $form
* @param FormStateInterface $form_state
* @param $form_id
*/
function your_module_form_views_exposed_form_alter(&$form, FormStateInterface $form_id) {
switch ($form['#id']) {
case 'your_form_id':
$form['field_xxxxx']['#type'] = 'textarea';
$form['field_xxxxx']['#rows'] = 5;
break;
}
}
/**
* Views pre view.
*
* @param \Drupal\views\ViewExecutable $view
* @param $display_id
* @param array $args
*/
function your_module_views_pre_view(ViewExecutable $view, $display_id, array &$args) {
if ($view->id() == 'your_view_id' && $display_id == 'your_display_id) {
$value = \Drupal::request()->query->get('field_xxxxx');
if (!empty($value)) {
$value = trim(preg_replace('![\r\n]+!', ' ', $value));
\Drupal::request()->query->set('field_xxxxxx', $value);
}
}
}
}