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

Support input-lg sizing #975

Closed
macedd opened this issue Mar 20, 2015 · 3 comments
Closed

Support input-lg sizing #975

macedd opened this issue Mar 20, 2015 · 3 comments

Comments

@macedd
Copy link

macedd commented Mar 20, 2015

Old issue, fixed: #694

Somehow the commit got out of current releases

@0x3333
Copy link

0x3333 commented Mar 23, 2015

I have the same issue with input-sm.

I add btn-sm in the button generated and it works great.

@gwrey
Copy link

gwrey commented Apr 28, 2015

I fixed this by making the following update. It translates any input-* classes on the select to btn- classes on the button.

Original code:

    setStyle: function (style, status) {
        if (this.$element.attr('class')) {
            this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|validate\[.*\]/gi, ''));
        }

New code:

    setStyle: function (style, status) {
        if (this.$element.attr('class')) {
            var selectClass = this.$element.attr('class').replace(/selectpicker|mobile-device|validate\[.*\]|form-control/gi, '');
            this.$button.addClass(selectClass.replace(/input-/g, "btn-"));
        }

@ghost
Copy link

ghost commented Apr 17, 2018

Please re-open this, as sizing is not working as expected.

$('.selectpicker').selectpicker({
    style: 'input-lg'
});

No class is being outputted, and the dropdown just remains as standard sizing.

avantika-gupta-jtg pushed a commit to JoshLabs/bootstrap-select that referenced this issue May 14, 2020
Provides ability to not use the .btn class on the button. e.g. change
styleBase to 'form-control' and style to 'input-lg'. Close snapappointments#975. Close
snapappointments#933.
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

3 participants