kartik-v / yii2-grid

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

BooleanColumn concatenate/doubles true/false-Labels and Default Labels in export #992

Closed tholag closed 2 years ago

tholag commented 3 years ago

Prerequisites

Steps to reproduce the issue

[ 'class' => 'kartik\grid\BooleanColumn', 'attribute' => 'ATTRIBUTENAME', 'trueLabel' => 'Yes', 'falseLabel' => 'No', ],

Expected behavior and actual behavior

When I follow those steps, Excel-Export will concatenate the Labels and the default labels to: "YesActive" "NoInactive" I was expecting Fieldvalues "Yes", "No" in Excel.

If I remove the trueLabel/falseLabel it concenates the default labels and exports the default label twice: "InactiveInactive" "ActiveActive"

This happens in all export file formats except html. App language is set to "de_DE".

Environment: PHP 7.2.42 Yii 2.0.43 kartik-v/yii2-grid dev-master 1aa635f (Same issue with v3.3.5)

kartik-v commented 2 years ago

Should not happen - update to latest release and ensure you have not overridden trueIcon and falseIcon - if error persists it maybe an issue with your configuration of the column. Do share the code to reproduce.