These are chat archives for angular-ui/ui-select

Jun 2015
Justin Romaine
Jun 01 2015 20:57
Hi All. Im using uiSelect with uiGrid but am having trouble with scope for the uiSelectChoices "refresh" callback function.
Anyone know which scope i need to place my callback. I have tried colDef of the uigrid and the main controller scope but nothing gets called. Anyone here been down this path?
im basing my code on Brian's example
So i have been trying to grab the scope using the wrapper directive in the example but the uiSelect refresh method seems to ignore it.
 app.directive("uiSelectWrap", ["$document", "uiGridEditConstants",
    function ($document, uiGridEditConstants) {
        return {
            scope: {
                refreshSearch: "&"
            link: function ($scope, $elm, $attr) {

                var $select = angular.element($elm, ".ui-select-choices").scope();
                $select.refreshSearch = $scope.refreshSearch;
                $document.on('click', function docClick(evt) {
                    if ($('.ui-select-container').size() === 0) {
                        $'click', docClick);
Justin Romaine
Jun 01 2015 21:03
So im grabbing the select scope from angular.element and assigning a method from the main controller to get the data for the choices