angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.27k stars 6.73k forks source link

Conditional expression inside custom template in order to make the particular list item unselectable #6309

Closed sabhsingh26 closed 7 years ago

sabhsingh26 commented 8 years ago

Hi All,

I am using uib-typeahead to show nested structure (flattening it to array). In this I wanted to make all the parent with child as non selectable and should be skipped when navigating from keyboard. And all children can be selectable so did put inside tag. In order to achieve this functionality, I put around ng-if statement on a tag and check whether it has children flag set or not. If it does have children property set, then skip the tag and go into div tag and check property. Now the tree structure is defined, uib-typeahead-ediatble is set to false, ui-typeahead-on-select it also set. But navigation using keyboard is weird as it does not skip all element list defined through DIV tag. And if I remove ng-if statements on and DIV tag, all list items are populated twice but keyboard navigation works only for element defined through tag. Wanted to understand, whether this is a feature desgined or missing feature ? I tried using typeahead-group header class but that will also involve conditions on a tag which again does not work.

icfantv commented 7 years ago

Per the issue template, the issues forum is not for support requests. Please read the link contained therein for how to ask for, and receive, assistance. Thanks.