vue-material table does not work with v-slot syntaxExtend vue-material components into my own componentsHow to use Vue Routes with Vue Material Tabs?vue-form doesn't work with vue-materialVue Material CSS displays badVue Material Onboarding ComponentVue-material stepper : keep input dataVue-material Dialog : Close DialogVue.js with vue material; scrollingHow to use vue material in a projectVue material tabs doesnt switch

How to innovate in OR

What is the significance of $(logname)?

Feedback diagram

A game of red and black

Is this popular optical illusion made of a grey-scale image with coloured lines?

Being told my "network" isn't PCI Complaint. I don't even have a server! Do I have to comply?

Is it really a problem to declare that a visitor to the UK is my "girlfriend", in terms of her successfully getting a Standard Visitor visa?

Not taking Bereavement Leave

Why are sugars in whole fruits not digested the same way sugars in juice are?

Can I say "Gesundheit" if someone is coughing?

Gold Battle KoTH

Backpacking with incontinence

Can birds evolve without trees?

Why doesn't this proof show that the operation on a factor group is well-defined?

How to gracefully excuse yourself from a meeting due to emergencies such as a restroom break?

Could flaps be raised upward to serve as spoilers / lift dumpers?

Is there anyway to harden soft braised carrots?

Security measures that could plausibly last 150+ years?

How does Asimov's second law deal with contradictory orders from different people?

How can a class have multiple methods without breaking the single responsibility principle

What is my clock telling me to do?

Guidelines for writing a chord progression

How do discovery writers hibernate?

How to structure presentation to avoid getting questions that will be answered later in the presentation?



vue-material table does not work with v-slot syntax


Extend vue-material components into my own componentsHow to use Vue Routes with Vue Material Tabs?vue-form doesn't work with vue-materialVue Material CSS displays badVue Material Onboarding ComponentVue-material stepper : keep input dataVue-material Dialog : Close DialogVue.js with vue material; scrollingHow to use vue material in a projectVue material tabs doesnt switch






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am using vue + vue-material to diplay a table.



on the vue-material docs i found, that rendering a table is very easy due to "slots" in vue found here at "custom template" - so i gave it a go on a simplified example with just name+age of 2 people.



<template>
<md-table v-model="people">
<md-table-row slot="md-table-row" slot-scope=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>

<script>
export default
name: 'app',
data: () =>
return
people: [
name: "Alice", age: 22,
name: "Bob", age: 21
]

,

</script>


works a treat. Then i looked up slots on the vue docs, and found there is a new syntax for scoped slots on vue 2.6+. So naturally i wanted to try it:



<template>
<md-table v-model="people">
<md-table-row v-slot:md-table-row=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>


This does not render the table and also does not log any errors to the javascript console.



I found the place where this slot is defined here on the vue-material github, to verify everything would be set up according to the vue documentation:



 <tbody v-else-if="value.length">
<md-table-row-ghost
v-for="(item, index) in value"
:key="getRowId(item, mdModelId)"
:md-id="getRowId(item, mdModelId)"
:md-index="index"
:md-item="item">
<slot name="md-table-row" :item="item" />
</md-table-row-ghost>
</tbody>


And yes, slot name is set, and v-bind:item="item" is also there, so as i understand, this should work with the new v-slot syntax.



Am I missing something?



EDIT.:



vue version 2.6.6
vue material 1.0.0.beta-10.2



I tried setting up a simple component defined just a slot (same name, also binding to :item) and wired it up using the "new" syntax - it worked.



appSlot:



<template>
<div>
<div v-for="name in names" :key="name">
<slot name="red-scope"
:content="name">
</slot>
</div>
</div>
<template>


where names comes via a property from AppWrapper:



<template>
<AppSlot :names="names">
<template #red-scope=" content ">
<p>hi content</p>
</template>
</AppSlot>
</template>
...
data() =>
return
names: ["Alice", "Bob"]




Does not make a lot of practical sense, but it verifies that my setup can handle the new syntax and it works










share|improve this question


























  • Gotta ask the question... are you using Vue 2.6+? This applies to any loaders (eg vue-loader)

    – Phil
    Mar 26 at 23:04












  • i am using vue 2.6.6, vue-material 1.0.0-beta-10.2

    – billdoor
    Mar 26 at 23:12











  • Seems very odd given the onus of the new syntax is on the consumer, ie your code. The component in question does not need to change anything. Was this you? github.com/vuematerial/vue-material/issues/2042

    – Phil
    Mar 26 at 23:33











  • I'd say it's a problem with the compiled code that vue-material ships. It may be related to this Vue issue ~ github.com/vuejs/vue/issues/9458

    – Phil
    Mar 26 at 23:45












  • Possible work-around is to import the src components instead of the dist ones. That or just keep using slot-scope for now.

    – Phil
    Mar 26 at 23:54

















1















I am using vue + vue-material to diplay a table.



on the vue-material docs i found, that rendering a table is very easy due to "slots" in vue found here at "custom template" - so i gave it a go on a simplified example with just name+age of 2 people.



<template>
<md-table v-model="people">
<md-table-row slot="md-table-row" slot-scope=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>

<script>
export default
name: 'app',
data: () =>
return
people: [
name: "Alice", age: 22,
name: "Bob", age: 21
]

,

</script>


works a treat. Then i looked up slots on the vue docs, and found there is a new syntax for scoped slots on vue 2.6+. So naturally i wanted to try it:



<template>
<md-table v-model="people">
<md-table-row v-slot:md-table-row=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>


This does not render the table and also does not log any errors to the javascript console.



I found the place where this slot is defined here on the vue-material github, to verify everything would be set up according to the vue documentation:



 <tbody v-else-if="value.length">
<md-table-row-ghost
v-for="(item, index) in value"
:key="getRowId(item, mdModelId)"
:md-id="getRowId(item, mdModelId)"
:md-index="index"
:md-item="item">
<slot name="md-table-row" :item="item" />
</md-table-row-ghost>
</tbody>


And yes, slot name is set, and v-bind:item="item" is also there, so as i understand, this should work with the new v-slot syntax.



Am I missing something?



EDIT.:



vue version 2.6.6
vue material 1.0.0.beta-10.2



I tried setting up a simple component defined just a slot (same name, also binding to :item) and wired it up using the "new" syntax - it worked.



appSlot:



<template>
<div>
<div v-for="name in names" :key="name">
<slot name="red-scope"
:content="name">
</slot>
</div>
</div>
<template>


where names comes via a property from AppWrapper:



<template>
<AppSlot :names="names">
<template #red-scope=" content ">
<p>hi content</p>
</template>
</AppSlot>
</template>
...
data() =>
return
names: ["Alice", "Bob"]




Does not make a lot of practical sense, but it verifies that my setup can handle the new syntax and it works










share|improve this question


























  • Gotta ask the question... are you using Vue 2.6+? This applies to any loaders (eg vue-loader)

    – Phil
    Mar 26 at 23:04












  • i am using vue 2.6.6, vue-material 1.0.0-beta-10.2

    – billdoor
    Mar 26 at 23:12











  • Seems very odd given the onus of the new syntax is on the consumer, ie your code. The component in question does not need to change anything. Was this you? github.com/vuematerial/vue-material/issues/2042

    – Phil
    Mar 26 at 23:33











  • I'd say it's a problem with the compiled code that vue-material ships. It may be related to this Vue issue ~ github.com/vuejs/vue/issues/9458

    – Phil
    Mar 26 at 23:45












  • Possible work-around is to import the src components instead of the dist ones. That or just keep using slot-scope for now.

    – Phil
    Mar 26 at 23:54













1












1








1








I am using vue + vue-material to diplay a table.



on the vue-material docs i found, that rendering a table is very easy due to "slots" in vue found here at "custom template" - so i gave it a go on a simplified example with just name+age of 2 people.



<template>
<md-table v-model="people">
<md-table-row slot="md-table-row" slot-scope=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>

<script>
export default
name: 'app',
data: () =>
return
people: [
name: "Alice", age: 22,
name: "Bob", age: 21
]

,

</script>


works a treat. Then i looked up slots on the vue docs, and found there is a new syntax for scoped slots on vue 2.6+. So naturally i wanted to try it:



<template>
<md-table v-model="people">
<md-table-row v-slot:md-table-row=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>


This does not render the table and also does not log any errors to the javascript console.



I found the place where this slot is defined here on the vue-material github, to verify everything would be set up according to the vue documentation:



 <tbody v-else-if="value.length">
<md-table-row-ghost
v-for="(item, index) in value"
:key="getRowId(item, mdModelId)"
:md-id="getRowId(item, mdModelId)"
:md-index="index"
:md-item="item">
<slot name="md-table-row" :item="item" />
</md-table-row-ghost>
</tbody>


And yes, slot name is set, and v-bind:item="item" is also there, so as i understand, this should work with the new v-slot syntax.



Am I missing something?



EDIT.:



vue version 2.6.6
vue material 1.0.0.beta-10.2



I tried setting up a simple component defined just a slot (same name, also binding to :item) and wired it up using the "new" syntax - it worked.



appSlot:



<template>
<div>
<div v-for="name in names" :key="name">
<slot name="red-scope"
:content="name">
</slot>
</div>
</div>
<template>


where names comes via a property from AppWrapper:



<template>
<AppSlot :names="names">
<template #red-scope=" content ">
<p>hi content</p>
</template>
</AppSlot>
</template>
...
data() =>
return
names: ["Alice", "Bob"]




Does not make a lot of practical sense, but it verifies that my setup can handle the new syntax and it works










share|improve this question
















I am using vue + vue-material to diplay a table.



on the vue-material docs i found, that rendering a table is very easy due to "slots" in vue found here at "custom template" - so i gave it a go on a simplified example with just name+age of 2 people.



<template>
<md-table v-model="people">
<md-table-row slot="md-table-row" slot-scope=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>

<script>
export default
name: 'app',
data: () =>
return
people: [
name: "Alice", age: 22,
name: "Bob", age: 21
]

,

</script>


works a treat. Then i looked up slots on the vue docs, and found there is a new syntax for scoped slots on vue 2.6+. So naturally i wanted to try it:



<template>
<md-table v-model="people">
<md-table-row v-slot:md-table-row=" item ">
<md-table-cell md-label="name"> item.name </md-table-cell>
<md-table-cell md-label="age"> item.age </md-table-cell>
</md-table-row>
</md-table>
</template>


This does not render the table and also does not log any errors to the javascript console.



I found the place where this slot is defined here on the vue-material github, to verify everything would be set up according to the vue documentation:



 <tbody v-else-if="value.length">
<md-table-row-ghost
v-for="(item, index) in value"
:key="getRowId(item, mdModelId)"
:md-id="getRowId(item, mdModelId)"
:md-index="index"
:md-item="item">
<slot name="md-table-row" :item="item" />
</md-table-row-ghost>
</tbody>


And yes, slot name is set, and v-bind:item="item" is also there, so as i understand, this should work with the new v-slot syntax.



Am I missing something?



EDIT.:



vue version 2.6.6
vue material 1.0.0.beta-10.2



I tried setting up a simple component defined just a slot (same name, also binding to :item) and wired it up using the "new" syntax - it worked.



appSlot:



<template>
<div>
<div v-for="name in names" :key="name">
<slot name="red-scope"
:content="name">
</slot>
</div>
</div>
<template>


where names comes via a property from AppWrapper:



<template>
<AppSlot :names="names">
<template #red-scope=" content ">
<p>hi content</p>
</template>
</AppSlot>
</template>
...
data() =>
return
names: ["Alice", "Bob"]




Does not make a lot of practical sense, but it verifies that my setup can handle the new syntax and it works







vuejs2 vue-material






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 23:19







billdoor

















asked Mar 26 at 22:45









billdoorbilldoor

9721 gold badge12 silver badges41 bronze badges




9721 gold badge12 silver badges41 bronze badges















  • Gotta ask the question... are you using Vue 2.6+? This applies to any loaders (eg vue-loader)

    – Phil
    Mar 26 at 23:04












  • i am using vue 2.6.6, vue-material 1.0.0-beta-10.2

    – billdoor
    Mar 26 at 23:12











  • Seems very odd given the onus of the new syntax is on the consumer, ie your code. The component in question does not need to change anything. Was this you? github.com/vuematerial/vue-material/issues/2042

    – Phil
    Mar 26 at 23:33











  • I'd say it's a problem with the compiled code that vue-material ships. It may be related to this Vue issue ~ github.com/vuejs/vue/issues/9458

    – Phil
    Mar 26 at 23:45












  • Possible work-around is to import the src components instead of the dist ones. That or just keep using slot-scope for now.

    – Phil
    Mar 26 at 23:54

















  • Gotta ask the question... are you using Vue 2.6+? This applies to any loaders (eg vue-loader)

    – Phil
    Mar 26 at 23:04












  • i am using vue 2.6.6, vue-material 1.0.0-beta-10.2

    – billdoor
    Mar 26 at 23:12











  • Seems very odd given the onus of the new syntax is on the consumer, ie your code. The component in question does not need to change anything. Was this you? github.com/vuematerial/vue-material/issues/2042

    – Phil
    Mar 26 at 23:33











  • I'd say it's a problem with the compiled code that vue-material ships. It may be related to this Vue issue ~ github.com/vuejs/vue/issues/9458

    – Phil
    Mar 26 at 23:45












  • Possible work-around is to import the src components instead of the dist ones. That or just keep using slot-scope for now.

    – Phil
    Mar 26 at 23:54
















Gotta ask the question... are you using Vue 2.6+? This applies to any loaders (eg vue-loader)

– Phil
Mar 26 at 23:04






Gotta ask the question... are you using Vue 2.6+? This applies to any loaders (eg vue-loader)

– Phil
Mar 26 at 23:04














i am using vue 2.6.6, vue-material 1.0.0-beta-10.2

– billdoor
Mar 26 at 23:12





i am using vue 2.6.6, vue-material 1.0.0-beta-10.2

– billdoor
Mar 26 at 23:12













Seems very odd given the onus of the new syntax is on the consumer, ie your code. The component in question does not need to change anything. Was this you? github.com/vuematerial/vue-material/issues/2042

– Phil
Mar 26 at 23:33





Seems very odd given the onus of the new syntax is on the consumer, ie your code. The component in question does not need to change anything. Was this you? github.com/vuematerial/vue-material/issues/2042

– Phil
Mar 26 at 23:33













I'd say it's a problem with the compiled code that vue-material ships. It may be related to this Vue issue ~ github.com/vuejs/vue/issues/9458

– Phil
Mar 26 at 23:45






I'd say it's a problem with the compiled code that vue-material ships. It may be related to this Vue issue ~ github.com/vuejs/vue/issues/9458

– Phil
Mar 26 at 23:45














Possible work-around is to import the src components instead of the dist ones. That or just keep using slot-scope for now.

– Phil
Mar 26 at 23:54





Possible work-around is to import the src components instead of the dist ones. That or just keep using slot-scope for now.

– Phil
Mar 26 at 23:54












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55367243%2fvue-material-table-does-not-work-with-v-slot-syntax%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55367243%2fvue-material-table-does-not-work-with-v-slot-syntax%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현