Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using tribute as component in nuxt does not load collection #40

Open
amdp opened this issue Sep 17, 2020 · 0 comments
Open

using tribute as component in nuxt does not load collection #40

amdp opened this issue Sep 17, 2020 · 0 comments

Comments

@amdp
Copy link

amdp commented Sep 17, 2020

Hi, first of all thanks for the previous help in #33
I now have:

//Note: comment object (and comment.id in the v-if) comes from an api that loads all comments data into a vuex store state
//the comment object is dynamic and gets generated by a v-for loop 
//(v-for="comment in up" :key="comment.id" --> where "up" is up comments from $store.state.comments)

       <b-row class="p-0 m-0" v-if="formswitch == comment.id">
          <b-col cols="12">
            <vue-tribute :options="options" id="commentTribute">
              <!-- !!!the mention function should carry the id of the comment !!!-->
              <b-container
                class="newcommentbox"
                contenteditable="true"
                @tribute-replaced="mention()"
                @click="check()"
                :id="'commentInput' + comment.id"
                v-on:keyup.enter="formcomment(comment, editreplyid)"
              ></b-container>
            </vue-tribute>
            <b-link @click="edit(comment)" class="hunderstanding">
              Cancel
            </b-link>
          </b-col>
        </b-row>

in which the v-if does not allow the tribute tag to load the collection and I get {"message":"[Tribute] No collection specified.","statusCode":500}. If I remove the v-if it gives me no error. I also read tribute docs and thought to use tribute.append or similar, but I don't know how to invoke the tribute object.
Now I made a sandbox starting from yours in #33 here: https://codesandbox.io/s/wispy-sea-6x6o3?file=/pages/index.vue
and the v-if works, even with a computed property, but now the upper box gives me " Tribute was already bound to INPUT "
My problem now is related to at least recreate my bad code/the bug in codesandbox as my computed property does not get acquired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant