smart-table

Angular JS Smart Table Filtered collection

自闭症网瘾萝莉.ら 提交于 2021-02-08 03:42:25
问题 Where is the filtered collection after filtered value in smart table. the table is bound with rowCollection . <table st-safe-src="rowCollection" st-table="displayed" class="table table-bordered"> and i have used a search filter: <input type="text" id="regionFilter" st-search="region" /> after the result are filtered i still see all records in rowCollection 回答1: You can create a directive to access the get the filtered Collection. For example: HTML: <table st-table="displayedCollection" st

Unable to select the grid item using SmartTable in Angular JS

柔情痞子 提交于 2020-01-14 07:48:11
问题 I have implemented grid using SmartTable in Angular JS. According to Smart Table docs, for selecting the grid item, we need to add st-select-row="row" . I added this one too. But i am unable to select the grid. Implemented app can be seen in plunk (url below). Can anybody please help me to use the grid row as selectable . Also, I want to call a function when clicking on row . Plunkr here 回答1: Your plunker actually works when selecting a row smart-table add the property isSelected=true to the

Smart-Table “st-sort” not working

∥☆過路亽.° 提交于 2020-01-12 04:39:08
问题 I'm using angular v1.3.15. I'm fetching data by hitting an api and passing it through the scope to the smart table like so Here is the data format of the 'scope.rowCollection' as seen on the console Data populates fine but When i'm trying to click on the table-header and sort it using st-sort method, the table values go blank clearly not sorting the column. Here is a view of my html snippet Can you please tell me what exactly am i doing wrong. The moment i use my own data collection set(NOT

Smart Table not update when search filter value changes from javascript [duplicate]

試著忘記壹切 提交于 2020-01-11 07:53:20
问题 This question already has an answer here : How to integrate Smart Table `st-search` with ng-model? (1 answer) Closed 2 years ago . I am using Angular Smart Table. While I am using search filters using st-search directive , when I change its value from javascript table doesnot get updates . here is my code Here is my controller angular.module('myApp', ['smart-table']) .controller('mainCtrl', ['$scope', '$timeout', function ($scope, $timeout) { var nameList = ['Pierre', 'Pol', 'Jacques',

AngularJS smart-table strange behavior with nested objects and st-search

时间秒杀一切 提交于 2020-01-11 05:26:11
问题 I'm trying to implement the Smart Table module in my AngularJS app. I'd prefer this over some others mainly because the others seemed require a lot of boilerplate code in my controller and I like to keep my controllers as DRY as possible. But I'm open to other modules that can accomplish the same thing without boilerplate. It works great when dealing with a straight-up array of objects, but if some of those objects have nested objects, the filtering and sorting has strange behavior. This will

Client side pagination not working in smart table

拥有回忆 提交于 2019-12-30 03:34:06
问题 So I got a Smart-table for witch I reload the entire data-set (I need it for a graph). but I don't want all data to get rendered at once (got too many). So in the documentation there is something called "Client Side Pagination" but that does not seem to work for some reason. objectDataArr[0] holds the entire data-set My mock up is: <div class="container"> <div class="row"> <div class="col-md-4"> <h1><strong>Preview Data: {{objectTranslations[objectData.LangKey]}}</strong></h1> </div> <div

Smart-table - Setting page from code

╄→尐↘猪︶ㄣ 提交于 2019-12-28 18:13:12
问题 I'm using the very good table library Smart-table to display my data. I am using a custom pagination template. I would however like to be able to set page 1 from the code. I have read up on the st-pipe directive it exposes, but it seems that I would need to re-write the whole filtering/pagination/sorting code myself if I implement that. I'm after a simple way to programatically set a page from outside of the st-pagination directive that exists in my table's tfoot <table st-table=

AngularJS: nest directive in ng-repeat for using smart-table with dynamic table fields

百般思念 提交于 2019-12-24 18:35:02
问题 I'm trying to use angular-smart-table for grid in my new AngularJS app. According to the document, to sort a column, I should use the st-sort directive like bellow: <th st-sort="firstName">first name</th> <th st-sort="lastName">last name</th> However, I'm trying to re-use the piece of code for not only one table, so I don't know the table field names in advance until the run-time. I'm doing something like bellow: <script type="text/ng-template" id="content1"> <div ng-repeat="table in $ctrl

Smart-Table - Select first row displayed (angularjs)

安稳与你 提交于 2019-12-24 03:25:31
问题 Is it possible to automatically select the first row when using smart-table. I have added the class st-selected conditionally using ng-class which highlights the row, but when I then select another row it does not deselect the first row. I would be grateful of any help. Thanks 回答1: I have just had a similar problem, but wanted to have a specified default selection, I solved the issue with allot of swearing and a directive. (function(undefined) { 'use strict'; angular .module('mymodule')

Best way to represent a Grid or Table in AngularJS with Bootstrap 3? [closed]

橙三吉。 提交于 2019-12-17 04:09:18
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I am creating an App with AngularJS and Bootstrap 3. I want to show a table/grid with thousands of rows. What is the best available control for AngularJS & Bootstrap with features like Sorting, Searching, Pagination etc. 回答1: After trying out ngGrid, ngTable, trNgGrid and