Skip to content

Conversation

@shatran
Copy link
Contributor

@shatran shatran commented Sep 9, 2014

Iv'e moved this.template assignment to occur before calling this.setup() in the constructor.
that way when this.setup() is called, this.template() is the correct template - the default one or the customised one.

…re this.setup() is called in the constructor.

that way when this.setup() is called, this.template() is the correct template - the default one or the customised one.
@premkumar-gg
Copy link

@shatran has just moved one line of code around. This should work fine.

@jefflundberg Just that when you initialise the comobobox, need to assign template option to a function that returns a string. Instead of assigning template option to a string.

Like this:

countrySelector.combobox({
        template: function() {
            return '<div class="combobox-wrap">' +
                        '<input type="hidden" />' +
                       '<i id="flag" class="selected-img icon-35x35flags-generic"></i>' +
                       '<input type="text" autocomplete="off" style="" />' +
                       '<span class="add-on dropdown-toggle" data-dropdown="dropdown">' + 
                            '<span class="caret"/>' + 
                        '</span>' +
                    '</div>';
        }
});

It works fine for me.

So, please merge this :) Might help somebody.

@burnnat
Copy link

burnnat commented Oct 6, 2015

👍

One year later, any plans for this to be merged? Without it, custom templates don't work...

@shatran
Copy link
Contributor Author

shatran commented Oct 7, 2015

@danielfarrell any chance it will be merged?

@danielfarrell
Copy link
Owner

@shatran I haven't been maintaining the project for some time. @thephw has been doing that.

@shatran
Copy link
Contributor Author

shatran commented Oct 8, 2015

@thephw any chance it will be merged?

thephw added a commit that referenced this pull request Oct 8, 2015
Solution for Issue #152: Custom template option doesn't work
@thephw thephw merged commit 55ff4d3 into danielfarrell:master Oct 8, 2015
@premkumar-gg
Copy link

Finally :)

Good job

On Thursday, 8 October 2015, Patrick Howard Wiseman <
notifications@github.com> wrote:

Merged #153 #153
.


Reply to this email directly or view it on GitHub
#153 (comment)
.

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

Successfully merging this pull request may close these issues.

6 participants