File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/Providers/DataGrid/Wijmo/Features Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ namespace Providers.DataGrid.Wijmo.Feature {
59
59
}
60
60
61
61
// Workaround for HTML tags being exported in CSV with Grouped Columns
62
- private _stripHtmlTags ( htmlString : string ) : string {
62
+ private _stripHtmlBoldTag ( htmlString : string ) : string {
63
63
if ( ! htmlString ) return '' ;
64
- return htmlString . replace ( / < (? ! > ) [ a - z A - Z 0 - 9 / ] [ ^ > ] * > / g, '' ) ;
64
+ return htmlString . replace ( / < b > | < \/ b > / g, '' ) ;
65
65
}
66
66
67
67
public build ( ) : void {
@@ -107,7 +107,12 @@ namespace Providers.DataGrid.Wijmo.Feature {
107
107
this . _resetPagination ( ) ;
108
108
109
109
const params = { fileName : this . _handleFilename ( filename , true ) } ;
110
- const result = this . _stripHtmlTags ( this . _grid . provider . getClipString ( this . _getFullCellRange ( ) , true , true ) ) ;
110
+ let result = this . _grid . provider . getClipString ( this . _getFullCellRange ( ) , true , true ) ;
111
+
112
+ // Remove text bold tags only when the grid is grouped
113
+ if ( this . _grid . features . groupPanel . isGridGrouped ) {
114
+ result = this . _stripHtmlBoldTag ( result ) ;
115
+ }
111
116
112
117
this . _reApplyPagination ( ) ;
113
118
wijmo . saveFile ( result , params . fileName ) ;
You can’t perform that action at this time.
0 commit comments