angular-ui-grid-ui网格过滤器切换不起作用,“类型未被识别”?
发布时间:2020-12-17 17:14:27 所属栏目:安全 来源:网络整理
导读:我有一个过滤器切换按钮,用于切换$scope.uiGridOptions.enableFiltering. $scope.toggleFiltering= function () { $scope.uiGridOptions.enableFiltering = !$scope.uiGridOptions.enableFiltering; $scope.gridApi.core.notifyDataChange( uiGridConstants.
我有一个过滤器切换按钮,用于切换$scope.uiGridOptions.enableFiltering.
$scope.toggleFiltering= function () { $scope.uiGridOptions.enableFiltering = !$scope.uiGridOptions.enableFiltering; $scope.gridApi.core.notifyDataChange( uiGridConstants.dataChange.COLUMN ); } {{uiGridOptions.enableFiltering}}更改true和false,但我的网格中的过滤器不会隐藏/显示. $scope.uiGridOptions = { enableFiltering:true,//default onRegisterApi: function (gridApi) { $scope.gridApi = gridApi; },columnDefs: [ { field: 'name',name: 'Name' }] } 在控制台中,跟随错误显示. Notified of a data change,but the type was not recognised,so no action taken,type was: undefined (anonymous function) d.service.q.logError o.notifyDataChange d.service.q.createBoundedWrapper $scope.toggleFiltering ib.functionCall Dc.(anonymous function).compile.d.on.f $get.l.$eval $get.l.$apply (anonymous function) jQuery.event.dispatch jQuery.event.add.elemData.handle 我希望有一个人可以帮助我. 解决方法
这发生在我身上,因为我使用的是最新的“官方”3.0.0-rc.20.尝试使用
github的ui-grid的不稳定版本.这解决了我的问题.而且,我正在使用Angular的1.2.28版本.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |