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

dropdownToggle disabled div #1867

Closed
Closed
@Sjonnie2nd

Description

@Sjonnie2nd

At first great work you guys are doing here.

I saw the recent feature request for the dropdown single/multiple select. Actually i've built my own "chosen"-like multiple select. For me that works better fe. when lots of selected options have to be shown. It wasn't too hard to build the directive. Angularjs en ui-bootstrap rock!

I just ran into a small issue.
Instead of an a-tag or a button-tag i put the dropdown-toggle on a div (which contains the selected elements).
ngDisabled on that div puts as expected a disabled="disabled" on it.
But the dropdown kept showing up.

Workarround:
Changing
"if (!elementWasOpen && !element.hasClass('disabled') && !element.prop('disabled'))"
into
"if (!elementWasOpen && !element.hasClass('disabled') && !element.prop('disabled') && !element.attr('disabled'))"
worked for me.

Looks like jquery doesnt like "disabled" to be a possible property of a div. However as attribute it is seen.

Maybe this would be usefull for others too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions