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 {
5959 }
6060
6161 // Workaround for HTML tags being exported in CSV with Grouped Columns
62- private _stripHtmlTags ( htmlString : string ) : string {
62+ private _stripHtmlBoldTag ( htmlString : string ) : string {
6363 if ( ! htmlString ) return '' ;
64- return htmlString . replace ( / < (? ! > ) [ a - z A - Z 0 - 9 / ] [ ^ > ] * > / g, '' ) ;
64+ return htmlString . replace ( / < b > | < \/ b > / g, '' ) ;
6565 }
6666
6767 public build ( ) : void {
@@ -107,7 +107,12 @@ namespace Providers.DataGrid.Wijmo.Feature {
107107 this . _resetPagination ( ) ;
108108
109109 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+ }
111116
112117 this . _reApplyPagination ( ) ;
113118 wijmo . saveFile ( result , params . fileName ) ;
You can’t perform that action at this time.
0 commit comments