vue-comps/vue-side-nav

fixed prop not accepting initial value

perkola opened this issue · 4 comments

I am trying to pass the fixed prop with an initial value of true but inspecting the component using Vue DevTools shows it as undefined

<template lang="jade">
    side-nav(:is-opened.sync="opened", fixed="fixed")
    ...
</template>

<script>
...
export default {
    data() {
        return {
            opened: false,
            fixed: true
        }
    },
    ...
}
</script>

Try 'side-nav(fixed, :is-opened.sync="opened")'

Or if you need it dynamic, use 'v-bind'.

Am 22. Mai 2016 6:21:57 nachm. schrieb William Perkola
notifications@github.com:

I am trying to pass the fixed prop with an initial value of true but
inspecting the component using Vue DevTools shows is as undefined

<template lang="jade">
    side-nav(:is-opened.sync="opened", fixed="fixed")
    ...
</template>

<script>
...
export default {
    data() {
        return {
            opened: false,
            fixed: true
        }
    },
    ...
}
</script>

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#1

@paulpflug

Didn't work. I've tried

fixed
fixed=true
fixed={true}
fixed="1"
fixed="fixed"

and those don't work either. Any ideas?

from what I know all of these should work:

fixed
fixed="fixed"
v-bind:fixed="true"
v-bind:fixed="fixed" # with a variable fixed set to true

In the example it is working:
https://github.com/vue-comps/vue-side-nav/blob/master/dev/fixed.vue#L4

I think I need more information to reproduce the problem..

close due to inactivity - Please let me know if you have further problems