File tree Expand file tree Collapse file tree 7 files changed +109
-98
lines changed
Expand file tree Collapse file tree 7 files changed +109
-98
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ export class SlickColumnMenu {
157157
158158 const labelElm = document . createElement ( 'label' ) ;
159159 labelElm . htmlFor = `${ this . _gridUid } colpicker-${ columnId } ` ;
160- labelElm . innerHTML = this . grid . sanitizeHtmlString ( columnLabel ) ;
160+ labelElm . innerHTML = this . grid . sanitizeHtmlString ( columnLabel instanceof HTMLElement ? columnLabel . innerHTML : columnLabel ) ;
161161 liElm . appendChild ( labelElm ) ;
162162 this . _listElm . appendChild ( liElm ) ;
163163 }
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ export class SlickColumnPicker {
158158
159159 const labelElm = document . createElement ( 'label' ) ;
160160 labelElm . htmlFor = `${ this . _gridUid } colpicker-${ columnId } ` ;
161- labelElm . innerHTML = this . grid . sanitizeHtmlString ( columnLabel ) ;
161+ labelElm . innerHTML = this . grid . sanitizeHtmlString ( columnLabel instanceof HTMLElement ? columnLabel . innerHTML : columnLabel ) ;
162162 liElm . appendChild ( labelElm ) ;
163163 this . _listElm . appendChild ( liElm ) ;
164164 }
Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ export class SlickGridMenu {
592592
593593 const labelElm = document . createElement ( 'label' ) ;
594594 labelElm . htmlFor = `${ this . _gridUid } -gridmenu-colpicker-${ columnId } ` ;
595- labelElm . innerHTML = this . grid . sanitizeHtmlString ( columnLabel || '' ) ;
595+ labelElm . innerHTML = this . grid . sanitizeHtmlString ( ( columnLabel instanceof HTMLElement ? columnLabel . innerHTML : columnLabel ) || '' ) ;
596596 liElm . appendChild ( labelElm ) ;
597597 this . _listElm . appendChild ( liElm ) ;
598598 }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export interface ColumnPickerOption {
3333 syncResizeTitle ?: string ;
3434
3535 /** Callback method to override the column name output used by the ColumnPicker/GridMenu. */
36- headerColumnValueExtractor ?: ( column : Column , gridOptions ?: GridOption ) => string ;
36+ headerColumnValueExtractor ?: ( column : Column , gridOptions ?: GridOption ) => string | HTMLElement ;
3737}
3838
3939export interface OnColumnsChangedArgs {
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export interface GridMenuOption {
8686 // action/override callbacks
8787
8888 /** Callback method to override the column name output used by the ColumnPicker/GridMenu. */
89- headerColumnValueExtractor ?: ( column : Column , gridOptions ?: GridOption ) => string ;
89+ headerColumnValueExtractor ?: ( column : Column , gridOptions ?: GridOption ) => string | HTMLElement ;
9090
9191 /** Callback method that user can override the default behavior of enabling/disabling an item from the list. */
9292 menuUsabilityOverride ?: ( args : MenuCallbackArgs < any > ) => boolean ;
You can’t perform that action at this time.
0 commit comments