Code Monkey home page Code Monkey logo

Comments (2)

maxwells avatar maxwells commented on July 28, 2024 1

Yeah - this plugin wasn't designed to do #1. If a user presses the down arrow while the input has focus, then it will show the list of suggestions. You could add a focus event handler to the input that calls makeSuggestions with the event as the first parameter and true as the second (this will cause the plugin to display all the suggestions when the input is empty). I don't plan to implement this in the near future.

I havent tried this, but something like:

src/bootstrap-tags.coffee

L370

@onFocusHandler = (event) =>
  @makeSuggestions(event, true)

L390

@input.focus @onFocusHandler

Or if you'd rather just hack on the javascript

dist/js/bootstrap-tags.js

L409

this.onFocusHandler = function(event) {
  this.makeSuggestions(event, true);
};

L427

this.input.focus(this.onFocusHandler);

from bootstrap-tags.

zifang avatar zifang commented on July 28, 2024

thank you very much

------------------ 原始邮件 ------------------
发件人: "David Stanley";[email protected];
发送时间: 2014年1月28日(星期二) 晚上10:47
收件人: "maxwells/bootstrap-tags"[email protected];

主题: [bootstrap-tags] How to get suggestion list (full list) to show whentags-input receives focus? (#23)

Not sure if this is the right place for this question. Close this if it isn't. I have the plugin all set up and working. What I would like to have is either one of these things (prefferably number 1):

Rather than have a tag input, I would like a drop down list of all my available tags (I am restricting input). When they click one, it adds the tag.

Using the input rather than drop down list, when the input receives focus, show the whole list of suggestions.


Reply to this email directly or view it on GitHub.

from bootstrap-tags.

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.