File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed
src/components/table/helpers Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,9 @@ export default {
204204 // a square bracket and if using in-document HTML templates, the
205205 // v-slot attributes are lower-cased by the browser.
206206 const slotNames = [ `cell[${ key } ]` , `cell[${ key . toLowerCase ( ) } ]` , 'cell[]' ]
207- let $childNodes = this . normalizeSlot ( slotNames , slotScope ) || toString ( formatted )
207+ let $childNodes = this . hasNormalizedSlot ( slotNames )
208+ ? this . normalizeSlot ( slotNames , slotScope )
209+ : toString ( formatted )
208210 if ( this . isStacked ) {
209211 // We wrap in a DIV to ensure rendered as a single cell when visually stacked!
210212 $childNodes = [ h ( 'div' , { } , [ $childNodes ] ) ]
Original file line number Diff line number Diff line change @@ -116,20 +116,22 @@ export default {
116116 ...slotNames
117117 ]
118118 }
119- const slot = this . normalizeSlot ( slotNames , {
120- label : field . label ,
121- column : field . key ,
122- field,
123- isFoot,
124- // Add in row select methods
125- selectAllRows,
126- clearSelected
127- } )
128- if ( ! slot ) {
129- // need to check if this will work
119+ const hasSlot = this . hasNormalizedSlot ( slotNames )
120+ let slot = field . label
121+ if ( hasSlot ) {
122+ slot = this . normalizeSlot ( slotNames , {
123+ label : field . label ,
124+ column : field . key ,
125+ field,
126+ isFoot,
127+ // Add in row select methods
128+ selectAllRows,
129+ clearSelected
130+ } )
131+ } else {
130132 data . domProps = htmlOrText ( field . labelHtml )
131133 }
132- return h ( BTh , data , slot || field . label )
134+ return h ( BTh , data , slot )
133135 }
134136
135137 // Generate the array of <th> cells
You can’t perform that action at this time.
0 commit comments