smart-table

Smart table - angularJs - ajax refresh table

主宰稳场 提交于 2019-12-13 12:15:20
问题 I am using the angularjs mudule smart table. My table has server-side processing and all the data load is located on the server. I want to have a refresh button outside of the table. This is the function that makes a call to the server and I want to be able to call it manually, but I can't figure out how to retrieve the table state in the my controller. this.callServer = function callServer(tableState) { ctrl.isLoading = true; var pagination = tableState.pagination; var start = pagination

smart-table Angular module unable to sort

我们两清 提交于 2019-12-12 22:06:30
问题 I am unable to do a simple sort for my Smart Table Angular module. Shouldn't I just be able to add st-sort="propertyName" to my th ? JS: var app = angular.module('app', []); app.controller('SomeController', ['$scope', function($scope) { $scope.items = [{color:'red'},{color:'blue'}]; }]); Html: <html ng-app="app"><body ng-controller="SomeController"> <table st-table="items"> <thead> <tr> <th st-sort="color">Color</th> </tr> </thead> <tbody> <tr ng-repeat="item in items"> <td>{{item.color}}</td

Unit testing an AngularJS (Smart Table) directive

主宰稳场 提交于 2019-12-12 01:51:44
问题 I am working with "Smart Table" and will be using their example plugin where a checkbox selects a row in a table: http://lorenzofox3.github.io/smart-table-website/#section-custom I am writing a unit test for this directive, code below, this is failing. Has anyone written a unit test for this code or could help direct me as to where I am going wrong and if I am actually testing the correct logic? Directive: myApp.directive('csSelect', function () { return { require: '^stTable', template: '',

Show number of filtered entries in SmartTable

左心房为你撑大大i 提交于 2019-12-11 13:26:07
问题 I am using the regular st-search directive for st-table to filter my smart table. Is it somehow possible to display the number of entries which match this filter? There seems to only be access to the total number entries ( entries ) as well as the ones currently shown in the paginator ( entries_displayed ). EDIT: minimal example: <table st-table="entries_displayed" st-safe-src="entries"> ... <input st-search=""/> ... </table 回答1: This has been implemented recently, the controller now has a

Smart-Table - Preselect a specific row

纵然是瞬间 提交于 2019-12-10 19:03:51
问题 I'm using smart-table and I need to preselect a specific row. So after loading my list, I loop into it and set the isSelected attribute when I reach the item I want to select: // Preselect a row for (var i = 0, len = scope.displayCollection.length; i < len; i += 1) { var person = scope.displayCollection[i]; if (person.firstName === 'Blandine') { person.isSelected = true; scope.selected = person; break; } } It's working fine, but when I want to select another line, the preselected line is not

AngularJS Smart Table Filtering By External Control

无人久伴 提交于 2019-12-10 06:23:49
问题 I am trying to figure out the correct way to incorporate st-table, st-safe-src, and filtering of the data by a control that lives outside of the table itself. Users can add, edit, and delete data so this is why i am using the safe source. any examples or feedback would be great! 回答1: Checkout this example which contains option to Add, Edit, Delete rows from the Smart-Table. http://plnkr.co/edit/DtD4xC javascript angular.module('myApp', ['smart-table']) .controller('mainCtrl', ['$scope',

smart-table - how to reset filter collection?

大兔子大兔子 提交于 2019-12-07 04:11:50
问题 New to Angular and smart-table.. This smart-table setup works and filters correctly, but trying to reset or clear the filters doesn't re-filter the table. Why not? Does updating an input with ng-model binding not trigger a watch that smart-table is looking for? Plunker is available here: http://plnkr.co/edit/4os3oWeJtEtMfa89QoQd?p=preview Code: var actionQueue = [ { Type: 'User Access Request', Description: 'test test test test test test test', DateRequested: '5/5/15' }, { Type: 'User Access

Make table 100% with fixed header with smart table angular

拜拜、爱过 提交于 2019-12-06 07:56:56
问题 http://plnkr.co/edit/GIeXoF?p=preview How can I make this table with a height of 100% height but the header must still remain fixed? <!DOCTYPE html> <html ng-app="myApp"> <head> <link data-require="bootstrap-css@3.2.0" data-semver="3.2.0" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" /> <script data-require="angular.js@1.2.25" data-semver="1.2.25" src="https://code.angularjs.org/1.2.25/angular.js"></script> <link rel="stylesheet" href="style.css" />

AngularJS Smart Table Filtering By External Control

耗尽温柔 提交于 2019-12-05 16:21:28
I am trying to figure out the correct way to incorporate st-table, st-safe-src, and filtering of the data by a control that lives outside of the table itself. Users can add, edit, and delete data so this is why i am using the safe source. any examples or feedback would be great! Rajkumar Checkout this example which contains option to Add, Edit, Delete rows from the Smart-Table. http://plnkr.co/edit/DtD4xC javascript angular.module('myApp', ['smart-table']) .controller('mainCtrl', ['$scope', function($scope) { $scope.rowCollection = [{ id: 100, firstName: 'Laurent', lastName: 'Renard',

smart-table - how to reset filter collection?

若如初见. 提交于 2019-12-05 06:38:04
New to Angular and smart-table.. This smart-table setup works and filters correctly, but trying to reset or clear the filters doesn't re-filter the table. Why not? Does updating an input with ng-model binding not trigger a watch that smart-table is looking for? Plunker is available here: http://plnkr.co/edit/4os3oWeJtEtMfa89QoQd?p=preview Code: var actionQueue = [ { Type: 'User Access Request', Description: 'test test test test test test test', DateRequested: '5/5/15' }, { Type: 'User Access Request', Description: 'blah blah', DateRequested: '3/3/10' }, { Type: 'Project Approval Request',