Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"kartik\select2\Select2" !== "\kartik\select2\Select2" #1045

Closed
rafalzareba opened this issue Sep 24, 2022 · 0 comments
Closed

"kartik\select2\Select2" !== "\kartik\select2\Select2" #1045

rafalzareba opened this issue Sep 24, 2022 · 0 comments

Comments

@rafalzareba
Copy link

filter for Select2 class is diffrent than const of Select2 in DataColumn

        [
          'class' => DataColumn::class,
          'attribute' => 'category',
          'filterType' => Select2::class, <--- this return kartik\select2\Select2 !!
          [...]
        ]

and follow to kartik\grid\DataColumn

`

         [...]
        if ($this->filterType === GridView::FILTER_SELECT2 || $this->filterType === GridView::FILTER_TYPEAHEAD) {
            $options['data'] = $this->filter;
        }
        [...]

`

and is false because const GridView::FILTER_SELECT2 = \kartik\select2\Select2 with \ in prefix

kartik\select2\Select2 !== \kartik\select2\Select2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants