Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Fix bootstrap styling for ui-select. #816

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix bootstrap styling for ui-select. #816

wants to merge 1 commit into from

Conversation

Ricky-rick
Copy link
Contributor

Style the ui-select like a form-control not like a button.

A pluker showing the problem. It shows the difference between a normal fom-control and the ui-select styling.
http://plnkr.co/edit/2Ev6ucprGpOxLTm81QCN?p=preview

Style the ui-select like a form-control not like a button.
@cdjackson
Copy link
Contributor

Interesting PR - this is a good idea IMHO. I haven't tried this PR, but I've just spent a couple of hours producing a LESS file to restyle it so that it looks like a form-control, and also works with the bootswatch themes, but it would be better if this was based on a form-control to start with.

@cyrilchaponeverysens
Copy link

@cdjackson could you provide that Less ? =p

@frederikprijck
Copy link

Any idea when this will be released ? I have buttons with border-radius 10px, but form-controls only have 4px, hence the ui-select having a border-radius of 10px instead of 4px.

I temporary fixed it using a directive:

(function () {
    "use strict";

    angular.module("myApp")
        .directive("haUiSelectFix", haUiSelectFixDirective);

    /*@ngInject*/
    function haUiSelectFixDirective(ValidatorService, Fields) {
        return {
            link: function (scope, elem, attrs, validationController) {
                var span = angular.element(elem).find("span.ui-select-toggle");
                span.removeClass("btn")
                    .removeClass("btn-default");
            }
        };
    }
})();

@ckosloski
Copy link

+1

@wesleycho
Copy link
Contributor

I think this was an intentional decision in the library.

Note that one can easily override templates in $templateCache.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants