PHPackages                             mgrechanik/gridviewfilterfix - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. mgrechanik/gridviewfilterfix

ActiveLibrary[Search &amp; Filtering](/categories/search)

mgrechanik/gridviewfilterfix
============================

Fix for Yii2 GridView DataColumn for filter validation errors to be properly shown with bootstrap 4 and 5

1.0.1(1y ago)0960BSD-3-ClausePHPPHP &gt;=7.3.0

Since Dec 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mgrechanik/gridviewfilterfix)[ Packagist](https://packagist.org/packages/mgrechanik/gridviewfilterfix)[ RSS](/packages/mgrechanik-gridviewfilterfix/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Fix for Yii2 GridView filter functionality to work properly with Bootstrap 4 and Bootstrap 5
============================================================================================

[](#fix-for-yii2-gridview-filter-functionality-to-work-properly-with-bootstrap-4-and-bootstrap-5)

What is it about?
------------------

[](#what-is-it-about-)

When you are using Yii2 default GridView you might meet a problem that validation errors for filter model are not displayed properly, like this:

[![Fix for Yii2 GridView DataColumn for filter validational errors to be properly shown with bootstrap 4 and 5](https://raw.githubusercontent.com/mgrechanik/gridviewfilterfix/refs/heads/main/docs/yii2-gridview-filter-fix-for-bootstrap4-and-5.png "Fix for Yii2 GridView DataColumn for filter validational errors to be properly shown with bootstrap 4 and 5")](https://raw.githubusercontent.com/mgrechanik/gridviewfilterfix/refs/heads/main/docs/yii2-gridview-filter-fix-for-bootstrap4-and-5.png)

Installing
-----------

[](#installing-)

#### Installing through composer::

[](#installing-through-composer)

The preferred way to install this library is through composer.

Either run

```
composer require --prefer-dist mgrechanik/gridviewfilterfix

```

or add

```
"mgrechanik/gridviewfilterfix" : "~1.0.0"

```

to the require section of your `composer.json`.

How to use
-----------

[](#how-to-use--)

Add the following lines of code to your main configuration file:

1. For Bootstrap 4

```
    'container' => [
        'definitions' => [
            \yii\grid\GridView::class => [
                'dataColumnClass' => \mgrechanik\gridviewfilterfix\Bs4DataColumn::class
            ]
        ]
    ],
```

2. For Bootstrap 5

```
    'container' => [
        'definitions' => [
            \yii\grid\GridView::class => [
                'dataColumnClass' => \mgrechanik\gridviewfilterfix\Bs5DataColumn::class
            ]
        ]
    ],
```

Similar problems with Forms or GridView and Bootstrap 4 / 5
-----------------------------------------------------------

[](#similar-problems-with-forms-or-gridview-and-bootstrap-4--5)

#### Paginator does not look good

[](#paginator-does-not-look-good--)

Solution:

```
    'container' => [
        'definitions' => [
            \yii\widgets\LinkPager::class => \yii\bootstrap5\LinkPager::class,
        ],
    ],
```

#### Error block under field is now shown, after failed validation, since this block is not at the same level with input.is-invalid

[](#error-block-under-field-is-now-shown-after-failed-validation-since-this-block-is-not-at-the-same-level-with-inputis-invalid)

There is a [library](https://github.com/mgrechanik/yii2-activefield-additional-error "Solve problem when invalid-feedback block is not visible for bootstrap in Yii2") to solve this problem

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83919f51df37e9d419895f01a9d4f55ef44c0dc764aec2a57081b6c5e2a3ed8a?d=identicon)[mgrechanik](/maintainers/mgrechanik)

---

Top Contributors

[![mgrechanik](https://avatars.githubusercontent.com/u/5772506?v=4)](https://github.com/mgrechanik "mgrechanik (9 commits)")

---

Tags

bootstrap4bootstrap5filtergridviewyii2phpvalidationfilteryii2bootstrap 4bootstrap-5gridviewfix error

### Embed Badge

![Health badge](/badges/mgrechanik-gridviewfilterfix/health.svg)

```
[![Health](https://phpackages.com/badges/mgrechanik-gridviewfilterfix/health.svg)](https://phpackages.com/packages/mgrechanik-gridviewfilterfix)
```

###  Alternatives

[thrieu/yii2-grid-view-state

Save filters from GridView to session, keep the filter state between pages.

1313.5k1](/packages/thrieu-yii2-grid-view-state)[cyneek/yii2-routes

Routing and filtering extension system for Yii2 framework that emulates the Laravel routing system.

202.1k](/packages/cyneek-yii2-routes)[phpsanitization/phpsanitization

Modern PHP Sanitization Library

181.5k](/packages/phpsanitization-phpsanitization)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
