kartik-v / yii2-grid

Enhanced GridView with various utilities for Yii Framework 2.0
http://demos.krajee.com/grid
Other
556 stars 303 forks source link

filterType Select2 allowClear not working #966

Closed ecmciasabellano closed 4 years ago

ecmciasabellano commented 4 years ago

I have a column that uses a GridView::FILTER_SELECT2 widget but the allowClear is not working. There is no "x" button to remove item selected.

image

Here is my code: image

All plugins are updated. Thanks for the help.

ecmciasabellano commented 4 years ago

Select2 plugin 2.1.8 update seems to have problem on allowClear. Downgrade to 2.1.7 to fix this issue.

kartik-v commented 4 years ago

This seems to be working fine -- please ensure your WEB ASSETS ARE CLEANED UP and you have no browser caching issues TO ensure you are running the latest CSS.

You can cross check all THEMES for v2.1.8 in the demo here --- scroll down and check all themes in the advanced demo.

ecmciasabellano commented 4 years ago

I'm not sure why it is still not working. I updated again the plugin to 2.1.8 and the "x" button is missing. I cleaned the web assets folder and used a hard refresh (ctr+f5). Btw, I'm using bootstrap 4 theme.

kartik-v commented 4 years ago

Maybe some other plugin css or another theme overriding this --- e.g. adminLTE

ecmciasabellano commented 4 years ago

I forgot to mention that I am using a theme. It's just the free bootstrap 4 theme. https://startbootstrap.com/themes/sb-admin-2/

But I also tried to remove the css of this theme on my AssetBundle and the allowClear "x" button is still not showing up.

Here is the code for my AssetBundle. image

kartik-v commented 4 years ago

This seems duplicate to kartik-v/yii2-widget-select2#329 - can you check my latest comment over there? Am closing this issue here - and will track there - as this is related to the SELECT2 widget.