Giter Club home page Giter Club logo

Comments (9)

mrsweaters avatar mrsweaters commented on May 30, 2024 1

Fixed in 2.0.3!

from tribute.

mrsweaters avatar mrsweaters commented on May 30, 2024

appendCurrent only works if there is an active instance of Tribute, meaning that someone has typed a trigger character and the menu is visible. Use append if there is no active instance.

from tribute.

syropian avatar syropian commented on May 30, 2024

@mrsweaters Looking at the source, it looks like both append() and appendCurrent() call a private _append() function that always checks if the menu is visible (see https://github.com/zurb/tribute/blob/master/src/Tribute.js#L251-L259)

from tribute.

mrsweaters avatar mrsweaters commented on May 30, 2024

Ah! You are correct, that should actually be specific to appendCurrent. This is a bug.

from tribute.

syropian avatar syropian commented on May 30, 2024

Cool, thanks for confirming! I'm currently working on a VueJS wrapper for Tribute, so due to the way data would be passed to the plugin, I can simply manually replace all the data whenever it changes, doing something like:

setValues(values){
  // If it has a "values" property, it's actually a collection
  if( values.hasOwnProperty("values") ){
    this.tribute.collection = values;
  }
  else {
    this.tribute.collection[0].values = values;
  }
}

from tribute.

mrsweaters avatar mrsweaters commented on May 30, 2024

@syropian Yeah that should work. Thanks for working on a wrapper for VueJS! When you're done, feel free to submit a PR to add it to the repo. That would be sweet!

from tribute.

syropian avatar syropian commented on May 30, 2024

Will do, how do you want me to go about creating a PR? Just a link in the README to the wrapper repo?

from tribute.

mrsweaters avatar mrsweaters commented on May 30, 2024

Sure, that will be fine.

from tribute.

ko06 avatar ko06 commented on May 30, 2024

setValues(values){ // If it has a "values" property, it's actually a collection if( values.hasOwnProperty("values") ){ this.tribute.collection = values; } else { this.tribute.collection[0].values = values; } }

it works but the menu still holding old data, once close it and open means its working fine, how to update forcefully?

from tribute.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.