Skip to content

Commit 487c592

Browse files
authored
chore(docs): add notes to table docs on slot name limitations when using v-slot syntax (#3984)
1 parent 8c667e0 commit 487c592

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/components/table/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,8 @@ information on the `busy` state.
797797
## Custom data rendering
798798

799799
Custom rendering for each data field in a row is possible using either
800-
[scoped slots](http://vuejs.org/v2/guide/components.html#Scoped-Slots) or formatter callback
801-
function.
800+
[scoped slots](http://vuejs.org/v2/guide/components.html#Scoped-Slots) or a formatter callback
801+
function, or a combination of both.
802802

803803
### Scoped field slots
804804

@@ -888,6 +888,10 @@ The slot's scope variable (`data` in the above sample) will have the following p
888888
sorting and pagination have been applied to the original table data. The `index` value will refer
889889
to the **displayed row number**. This number will align with the indexes from the optional
890890
[`v-model` bound](#v-model-binding) variable.
891+
- When using the new Vue 2.6 `v-slot` syntax, note that slot names **cannot** contain spaces, and
892+
when using in-browser DOM templates the slot names will _always_ be lower cased. To get around
893+
this, you can pass the slot name using Vue's
894+
[dynamic slot names](https://vuejs.org/v2/guide/components-slots.html#Dynamic-Slot-Names)
891895

892896
#### Displaying raw HTML
893897

@@ -1089,6 +1093,13 @@ When placing inputs, buttons, selects or links within a `HEAD[...]` or `FOOT[...
10891093
are disabled). `head-clicked` will never be emitted when clicking on links or buttons inside the
10901094
scoped slots (even when disabled)
10911095

1096+
**Notes:**
1097+
1098+
- When using the new Vue 2.6 `v-slot` syntax, note that slot names **cannot** contain spaces, and
1099+
when using in-browser DOM templates the slot names will _always_ be lower cased. To get around
1100+
this, you can pass the slot name using Vue's
1101+
[dynamic slot names](https://vuejs.org/v2/guide/components-slots.html#Dynamic-Slot-Names)
1102+
10921103
### Adding additional rows to the header
10931104

10941105
If you wish to add additional rows to the header you may do so via the `thead-top` slot. This slot

0 commit comments

Comments
 (0)