-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Some times i have error [ui.select:transcluded] Expected 1 .ui-select-choices but got '0'. #218
Comments
help pls |
+1 - It's occurring for the select2 theme |
Can you create a plunker so that I can reproduce this error? |
Looks related to #224 |
What version of Angular are you using? I had this problem with 1.2.14 but works fine after upgrading (in my case to 1.2.26). |
i use AngularJS v1.2.20 |
problem remain |
@zloyreznic I also had the same issue,but now everything fixed.Make sure the following two things Thanks |
+1 For using select.js under dist. Fixed the issue immediately. Thanks! |
I'm getting this error, and am using ui-select version 0.9.5 (from the dist folder), and angular 1.3.6 I have found that the error appears when I include this CSS styling: .select2-container .select2-choice { And it goes away again when I remove this styling..... |
I was struggling to resolve this issue for 2 days. I tried different versions of Angular (1.2.9, 1.3.13, and 1.4.0b), choice of theme, timeouts etc. - nothing worked. I finally resolved the issue by copying the theme templates to be in-line angular script tags instead of loading them via an HTTP request. There was a strange race condition between compilation of the templates and transclusion of the drop-down items - this was the only thing that was able to fix the problem. This also fixes issue [https://github.com//issues/224] with the .ui-select-match transclusion. You also need to make sure that the templates are in the following order: <script type="text/ng-template" id="selectize/match.tpl.html">
<div ng-hide="($select.open || $select.isEmpty())" class="ui-select-match" ng-transclude></div>
</script>
<script type="text/ng-template" id="selectize/choices.tpl.html">
<div ng-show="$select.open" class="ui-select-choices selectize-dropdown single">
<div class="ui-select-choices-content selectize-dropdown-content">
<div class="ui-select-choices-group optgroup" role="listbox">
<div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header"
ng-bind="$group.name"></div>
<div role="option" class="ui-select-choices-row"
ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}">
<div class="option ui-select-choices-row-inner" data-selectable></div>
</div>
</div>
</div>
</div>
</script>
<script type="text/ng-template" id="selectize/select.tpl.html">
<div class="ui-select-container selectize-control single" ng-class="{'open': $select.open}">
<div class="selectize-input"
ng-class="{'focus': $select.open, 'disabled': $select.disabled, 'selectize-focus' : $select.focus}"
ng-click="$select.activate()">
<div class="ui-select-match"></div>
<input type="text" autocomplete="off" tabindex="-1"
class="ui-select-search ui-select-toggle"
ng-click="$select.toggle($event)"
placeholder="{{$select.placeholder}}"
ng-model="$select.search"
ng-hide="!$select.searchEnabled || ($select.selected && !$select.open)"
ng-disabled="$select.disabled"
aria-label="{{$select.baseTitle}}">
</div>
<div class="ui-select-choices"></div>
</div>
</script> |
@nasturah thanks, this is the only functioning workaround for me so far. |
I applied the fix mentionned here: #1325, but I still get the error: <ui-select multiple ng-model="data.attributes" theme="select2" id="cAttributes">
<ui-select-match class="ui-select-match" placeholder="{{ 'select-attribute' | translate }}...">{{ $item.description | translate }}
</ui-select-match>
<ui-select-choices class="ui-select-choices" repeat="attribute.code as attribute in cAttributes | filter:$select.search" group-by="'origin'">
{{attribute.description}}
</ui-select-choices>
</ui-select> |
@audreyn Yes, I have the same issue. It occurs only with group-by attribute. |
@chuckyblack it does not.. I have it without Also feeling up the choices feels extremely laggy compared to 0.13.2 and Angular 1.4.8.. It does not allow me to select/scroll until list is fully loaded.. which takes up to 3s for about 200 items.
Any solution at the moment? I applied those classes which did not solve the issue, just decreased the probability of the error.. Thanks, Michal |
I am also getting a
PS: It might be related to a conflict with other libraries? I am having issues (see #46) only within my application but not when I set up small test scenarios in plunker as |
@realavaloro, // get the ui select controller
var uiSelect = angular.element("#fooBar").controller('uiSelect');
// Open the select and focus:
uiSelect.activate(); Mistakenly, I forgot to add the focusser to the select before activating it. Which it turn was causing some of my issues with the dropdown being open before it's proper "user based" trigger sequence. // focus the focusser, putting focus onto select but without opening the dropdown
uiSelect.focusser[0].focus(); Not sure if that helps, but something to consider. After some additional findings, doing the above will open the ui-select (inside of a modal) the first time the modal is shown. The second time the modal is show I get the following error, but the ui-select still opens: |
Should note, that hack is not possible if you are using $compileProvider.debugInfoEnabled(false) for production builds. This needs a Plunker reproduction though. |
For me this problem started when I have included ngAnimate into my module |
tried workaround, still have this problem in ui-select-choises without group by. |
+1 same here UPDATE cc: @user378230 |
Please include your angular and ui select library versions if you're going to leave +1s... Note only the latest version is supported and this issue still lacks a plunkr. |
I have made one sample working plunker using bootstrap modal(with angular 1.5.8, jQuery 3.1.0 bootstrap 3.3.7, ui-bootstrap 2.0.1, latest ui-select), those who are facing similar issue can try to regenerate issue in this. |
FROM: This will resolve the issue when clicking on the ui-select arrow |
The issue is still present in the 0.19.4 version Angular 1.5.8 EDIT : here is a plunkr with the issue |
Having this issue with ui-select version 0.11.2 after upgrading from AngularJS 1.4.8 to 1.5.8. Bootstrap version is 3.3.6. Edit: here's a plunker with the issue I'm seeing. The field doesn't render at all. http://plnkr.co/edit/ZgqS05zgSgoEpvmks6io?p=preview I'm not able to update the version of ui-select because I'm integrating code from another team so it would take months. They're on an older version of angular, so they don't have these issues. |
Getting error "Error: [ui.select:transcluded] Expected 1 .ui-select-match but got '0'." with ui-select version 0.14.1 as using with Angular 1.6.1. |
Finally resolved by adding the class ui-select-match and ui-select-choices to |
My error was caused by a validation directive on the form, once the validation directive was removed everything worked. |
I still receive this error on 0.19.6 using kibana 6.2.3's filter_field_select.js file. Works if I remove the groupby |
Error: [ui.select:transcluded] Expected 1 .ui-select-choices but got '0'.
at http://localhost:63342/test/src/js/select.js:77:14
at http://localhost:63342/test/src/js/select.js:804:19
at publicLinkFn (http://localhost:63342/test/src/js/libs/angular.js:5933:29)
at boundTranscludeFn (http://localhost:63342/test/src/js/libs/angular.js:6059:21)
at controllersBoundTransclude (http://localhost:63342/test/src/js/libs/angular.js:6669:18)
at link (http://localhost:63342/test/src/js/select.js:786:9)
at nodeLinkFn (http://localhost:63342/test/src/js/libs/angular.js:6648:13)
at http://localhost:63342/test/src/js/libs/angular.js:6850:13
at http://localhost:63342/test/src/js/libs/angular.js:8050:11
at wrappedCallback (http://localhost:63342/test/src/js/libs/angular.js:11498:81)
if refresh page error disapear and sometime error appear...
The text was updated successfully, but these errors were encountered: