Skip to content
Snippets Groups Projects
Commit 4040237f authored by Daniel Cothran's avatar Daniel Cothran
Browse files

Issue #3513425 by andileco, nikathone: Selected column not getting saved on CSV Field Filter

parent f699a9e9
No related branches found
Tags 1.0.10
1 merge request!28Update file ViewsCsvFilter.php
Pipeline #459036 passed with warnings
......@@ -16,7 +16,6 @@ use Drupal\views_csv_source\Plugin\views\ColumnSelectorTrait;
class ViewsCsvFilter extends FilterPluginBase {
use ColumnSelectorTrait;
use ViewsCsvFilterTrait;
/**
* Exposed filter options.
......@@ -30,7 +29,7 @@ class ViewsCsvFilter extends FilterPluginBase {
*/
protected function defineOptions() {
$options = parent::defineOptions();
$options['key'] = ['default' => ''];
$options['expose']['contains']['required'] = ['default' => FALSE];
$options['expose']['contains']['placeholder'] = ['default' => ''];
......
......@@ -25,7 +25,7 @@ class ViewsCsvFilterSelect extends InOperator {
*/
protected function defineOptions(): array {
$options = parent::defineOptions();
$options['key']['default'] = '';
$options['key'] = ['default' => ''];
$options['empty_cell_behavior']['default'] = 'none';
$options['multi_value_cell_separator']['default'] = '';
return $options;
......
<?php
namespace Drupal\views_csv_source\Plugin\views\filter;
/**
* Trait to add options to the filter handler.
*/
trait ViewsCsvFilterTrait {
/**
* {@inheritdoc}
*/
protected function defineOptions(): array {
$options = parent::defineOptions();
$options['key']['default'] = '';
return $options;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment