ng-tasty icon indicating copy to clipboard operation
ng-tasty copied to clipboard

Reload callback not working

Open darkmakukudo opened this issue 10 years ago • 4 comments

Hi,

The list is not updating when I trigger reload callback function after modal close.

// Inside my view
 <div tasty-table
             bind-resource-callback="showStudents.loadAllStudentsRecords"
             bind-init="showStudents.init"
             bind-reload="reloadCallback"

// Inside my controller
...
Other implementations here
...
vm.reloadCallback = function () { alert("Called"); };

vm.delete = function (studId) {

        // Show modal
        var modalInstance = $uibModal.open({
            templateUrl: 'AppScripts/Views/Student/DeleteStudent.html',
            controller: 'DeleteStudentCtrl as deleteStudent',
            backdrop  : 'static',
            keyboard  : false,
            resolve: {
                studentId: function () {
                    return studId;
                }
            }
        });

        modalInstance.result.then(function (status) {
            if (status === 'ok')
            {
                vm.reloadCallback();
            }
        });

The alert was executed when i call the reloadCallback function but the list is not updated By the way im using "controller as" syntax.

darkmakukudo avatar Mar 30 '16 03:03 darkmakukudo

I also tried to remove first the modal implementation so i will stay on the same controller, but reloadCallback still not working

darkmakukudo avatar Mar 31 '16 02:03 darkmakukudo

Is your callback firering? If I add the atrribute bind-reload="reloadCallback" to my table, the entire table will not be rendered:

image

or did you have a solution?

Disane87 avatar Aug 19 '16 13:08 Disane87

i also have this issue anyone found solution on this ? please help

ghost avatar Feb 09 '17 09:02 ghost

hi, i have the same problem....

dv9 avatar Feb 14 '17 19:02 dv9