Skip to content

Custom template option doesn't work #152

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

Open
shatran opened this issue Sep 9, 2014 · 2 comments
Open

Custom template option doesn't work #152

shatran opened this issue Sep 9, 2014 · 2 comments

Comments

@shatran
Copy link
Contributor

shatran commented Sep 9, 2014

According to the Docs, it is possible to add a custom template function that returns markup for the combobox, by including it in an object containing template attribute.
This option doesn't work.

jefflundberg added a commit to jefflundberg/bootstrap-combobox that referenced this issue Oct 8, 2014
@mort4l-zz
Copy link

This is still happening.

var Combobox = function ( element, options ) {
  this.options = $.extend({}, $.fn.combobox.defaults, options);
  this.$source = $(element);
  this.$container = this.setup();
  this.$element = this.$container.find('input[type=text]');
  this.$target = this.$container.find('input[type=hidden]');
  this.$button = this.$container.find('.dropdown-toggle');
  this.$menu = $(this.options.menu).appendTo('body');
  this.template = this.options.template || this.template
  this.matcher = this.options.matcher || this.matcher;
  this.sorter = this.options.sorter || this.sorter;
  this.highlighter = this.options.highlighter || this.highlighter;
  this.shown = false;
  this.selected = false;
  this.refresh();
  this.transferAttributes();
  this.listen();
};

this.template initialization should happen before this.setup() is fired.

@shatran
Copy link
Contributor Author

shatran commented Aug 4, 2015

I suggest this solution here but i don't know if someone took card of merging it.

thephw added a commit that referenced this issue Oct 8, 2015
Solution for Issue #152: Custom template option doesn't work
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

2 participants