Closed adamwinn closed 5 years ago
I fixed this by doing
Option 1: Font CSS version of Font Awesome:
<!-- on your view layout file HEAD section -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css">
I had previously done the alternative part to Option 2, as shown in my setup above, but that didn't work
Alternatively, you can use the FontAwesomeAsset from the kartik-v/yii2-icons package to load the SVG/JS version.
// on your view layout file
use kartik\icons\FontAwesomeAsset;
FontAwesomeAsset::register($this);
Yes its because Yii2 grid by default uses the CSS method to inject the SORT / FILTER ICON content in the css ::after
pseudo for the table header title. So using Font Awesome CSS will work.
If using FontAwesomeAsset (where it uses Font awesome JS and SVG) - you need to write your own JS code or additional css to embed the icons.
Prerequisites
master
branch of yii2-dynagrid.Steps to reproduce the issue
When using dynagrid and clicking on a header to sort, the asc/desc icon shows up as a weird box. This doesn't happen on the demo page.
actual behavior
browser console
Browsers
Operating System
Libraries
Isolating the problem