Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

<slot> cannot appear inside <table> #55

Closed
rstoenescu opened this issue Jan 28, 2017 · 3 comments
Closed

<slot> cannot appear inside <table> #55

rstoenescu opened this issue Jan 28, 2017 · 3 comments

Comments

@rstoenescu
Copy link

Expected behavior

Should not give warning.

Actual behavior

Gives warnings:

 Warning in src/vue-components/data-table/DataTable.vue:
 
  58 | 
  59 |     <div v-else class="q-data-table-container" @mousewheel="mouseWheel" @DOMMouseScroll="mouseWheel">
    |                                                                         ^
  60 |       <div v-if="hasHeader" class="q-data-table-head" ref="head" :style="{marginRight: scroll.vert}">

  Found camelCase attribute: @DOMMouseScroll="mouseWheel". HTML is case-insensitive. Use @dommouse-scroll="mouseWheel" instead. Vue will automatically interpret it as camelCase in JavaScript. If this is an SVG camelCase attribute, use the .camel modifier.


 Warning in src/vue-components/data-table/plugins/sticky-cols/TableSticky.vue:
 
  27 |     <tbody v-if="!head">
  28 |       <slot></slot>
    |       ^
  29 |     </tbody>

  Tag <slot> cannot appear inside <table> due to HTML content restrictions. It will be hoisted out of <table> by the browser.


 Warning in src/vue-components/data-table/TableContent.vue:
 
  26 |     <tbody v-else>
  27 |       <slot></slot>
    |       ^
  28 |     </tbody>

  Tag <slot> cannot appear inside <table> due to HTML content restrictions. It will be hoisted out of <table> by the browser.

Steps to reproduce the behavior

This has been fixed in previous versions but upgrading to "rollup": "^0.41.4" and "rollup-plugin-vue": "2.2.18" brings back the problem.

Awesome work with this plugin. When I have some money I will donate for it. Any links for this? Thanks!

@znck
Copy link
Member

znck commented Jan 29, 2017

Before compiling, templates are validated using vue-template-validator. These warnings does not effect the compilation process.

IMO <slot> in <table> when compiled to render function does not have any side effects. If you can confirm that I can suppress these warnings when compileTemplate is set to true.


I'm experimenting with docs & design of the repository and website. 😃 Suggestions are welcome.

And thanks a lot supporting the plugin. I was planning to add a donation link after I have satisfactory docs. 😁 Though here is the donation link: https://www.paypal.me/znck

@rstoenescu
Copy link
Author

Done. And thank you for the quick turnaround!

@znck
Copy link
Member

znck commented Jan 30, 2017

😃 Thanks

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants